Task #58 - gcc-14.0.1-0.15.fc41/scan-results.err
back to task #58download
Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:90:13: warning[SC2089]: Quotes/backslashes will be treated literally. Rewrite using set/"$@" or functions. # 88| //*) # 89| # On an Apollo, discard everything before `/usr'. # 90|-> PWDCMD="eval pwd | sed -e 's,.*/usr/,/usr/,'" # 91| ;; # 92| esac Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:95:10: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 93| # 94| # Original directory. # 95|-> ORIGDIR=`${PWDCMD}` # 96| export ORIGDIR # 97| FIXINCL=`${PWDCMD}`/fixincl Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:97:10: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 95| ORIGDIR=`${PWDCMD}` # 96| export ORIGDIR # 97|-> FIXINCL=`${PWDCMD}`/fixincl # 98| if [ ! -x $FIXINCL ] ; then # 99| echo "Cannot find fixincl" >&2 Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:109:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 107| ;; # 108| *) # 109|-> cd $LIB; LIB=`${PWDCMD}` # 110| ;; # 111| esac Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:109:19: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 107| ;; # 108| *) # 109|-> cd $LIB; LIB=`${PWDCMD}` # 110| ;; # 111| esac Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:178:15: warning[SC2124]: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. # 176| INPUTLIST="/usr/include" # 177| else # 178|-> INPUTLIST="$@" # 179| fi # 180| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:183:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 181| for INPUT in ${INPUTLIST} ; do # 182| # 183|-> cd ${ORIGDIR} # 184| # 185| # Make sure a directory exists before changing into it, Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:191:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 189| continue # 190| fi # 191|-> cd ${INPUT} # 192| # 193| INPUT=`${PWDCMD}` Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:193:8: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 191| cd ${INPUT} # 192| # 193|-> INPUT=`${PWDCMD}` # 194| export INPUT # 195| Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:261:9: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 259| fi # 260| # 261|-> OLDDIR=`${PWDCMD}` # 262| cd $LIB # 263| echo "$all_dirs" | xargs mkdir -p Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:262:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 260| # 261| OLDDIR=`${PWDCMD}` # 262|-> cd $LIB # 263| echo "$all_dirs" | xargs mkdir -p # 264| cd ${OLDDIR} Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:264:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 262| cd $LIB # 263| echo "$all_dirs" | xargs mkdir -p # 264|-> cd ${OLDDIR} # 265| # 266| mkdir $LIB/root Error: SHELLCHECK_WARNING (CWE-563): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:278:3: warning[SC2034]: cwd appears unused. Verify use (or export if used externally). # 276| if test $VERBOSE -gt 1 # 277| then echo 'Making symbolic directory links' ; fi # 278|-> cwd=`${PWDCMD}` # 279| # 280| for sym_link in $search_dirs; do Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:278:8: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 276| if test $VERBOSE -gt 1 # 277| then echo 'Making symbolic directory links' ; fi # 278|-> cwd=`${PWDCMD}` # 279| # 280| for sym_link in $search_dirs; do Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:281:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 279| # 280| for sym_link in $search_dirs; do # 281|-> cd ${INPUT} # 282| dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'` # 283| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:286:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 284| # In case $dest is relative, get to ${sym_link}'s dir first. # 285| # # 286|-> cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'` # 287| # 288| # Check that the target directory exists. Error: SHELLCHECK_WARNING (CWE-156): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:286:10: warning[SC2046]: Quote this to prevent word splitting. # 284| # In case $dest is relative, get to ${sym_link}'s dir first. # 285| # # 286|-> cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'` # 287| # 288| # Check that the target directory exists. Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:291:6: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 289| # Redirections changed to avoid bug in sh on Ultrix. # 290| # # 291|-> (cd $dest) > /dev/null 2>&1 # 292| if [ $? = 0 ]; then # 293| cd $dest Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:293:7: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 291| (cd $dest) > /dev/null 2>&1 # 292| if [ $? = 0 ]; then # 293|-> cd $dest # 294| # 295| # full_dest_dir gets the dir that the link actually leads to. Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:297:22: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 295| # full_dest_dir gets the dir that the link actually leads to. # 296| # # 297|-> full_dest_dir=`${PWDCMD}` # 298| # 299| # Canonicalize ${INPUT} now to minimize the time an Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:302:15: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 300| # automounter has to change the result of ${PWDCMD}. # 301| # # 302|-> cinput=`cd ${INPUT}; ${PWDCMD}` # 303| # 304| # If a link points to ., make a similar link to . Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:302:28: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 300| # automounter has to change the result of ${PWDCMD}. # 301| # # 302|-> cinput=`cd ${INPUT}; ${PWDCMD}` # 303| # 304| # If a link points to ., make a similar link to . Error: SHELLCHECK_WARNING (CWE-398): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:309:16: warning[SC2115]: Use "${var:?}" to ensure this never expands to / . # 307| if test $VERBOSE -gt 2 # 308| then echo ${sym_link} '->' . ': Making self link' ; fi # 309|-> rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 # 310| ln -s . ${LIB}/${sym_link} > /dev/null 2>&1 # 311| Error: SHELLCHECK_WARNING (CWE-398): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:323:16: warning[SC2115]: Use "${var:?}" to ensure this never expands to / . # 321| if test $VERBOSE -gt 2 # 322| then echo ${sym_link} '->' $dots$y ': Making local link' ; fi # 323|-> rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 # 324| ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1 # 325| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:340:11: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 338| dirname=root${full_dest_dir}/ # 339| dirmade=. # 340|-> cd $LIB # 341| while [ x$dirname != x ]; do # 342| component=`echo $dirname | sed -e 's|/.*$||'` Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:344:13: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 342| component=`echo $dirname | sed -e 's|/.*$||'` # 343| mkdir $component >/dev/null 2>&1 # 344|-> cd $component # 345| dirmade=$dirmade/$component # 346| dirname=`echo $dirname | sed -e 's|[^/]*//*||'` Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:374:17: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 372| # # 373| parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` # 374|-> libabs=`cd ${LIB}; ${PWDCMD}` # 375| file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` # 376| Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:374:28: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 372| # # 373| parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` # 374|-> libabs=`cd ${LIB}; ${PWDCMD}` # 375| file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` # 376| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:375:16: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 373| parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` # 374| libabs=`cd ${LIB}; ${PWDCMD}` # 375|-> file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` # 376| # 377| # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:375:27: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 373| parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` # 374| libabs=`cd ${LIB}; ${PWDCMD}` # 375|-> file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` # 376| # 377| # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:375:39: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 373| parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` # 374| libabs=`cd ${LIB}; ${PWDCMD}` # 375|-> file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` # 376| # 377| # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. Error: SHELLCHECK_WARNING (CWE-398): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:380:16: warning[SC2115]: Use "${var:?}" to ensure this never expands to / . # 378| # # 379| dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` # 380|-> rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 # 381| ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1 # 382| treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}" Error: SHELLCHECK_WARNING (CWE-456): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:391:5: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'. # 389| # # 390| required= # 391|-> set x $treetops # 392| shift # 393| while [ $# != 0 ]; do Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:396:11: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 394| # $1 is an old directory to copy, and $2 is the new directory to copy to. # 395| # # 396|-> SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` # 397| export SRCDIR # 398| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:396:25: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 394| # $1 is an old directory to copy, and $2 is the new directory to copy to. # 395| # # 396|-> SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` # 397| export SRCDIR # 398| Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:396:33: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 394| # $1 is an old directory to copy, and $2 is the new directory to copy to. # 395| # # 396|-> SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` # 397| export SRCDIR # 398| Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:403:12: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 401| shift # 402| # 403|-> DESTDIR=`cd $1;${PWDCMD}` # 404| export DESTDIR # 405| shift Error: SHELLCHECK_WARNING (CWE-569): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:403:18: warning[SC2090]: Quotes/backslashes in this variable will not be respected. # 401| shift # 402| # 403|-> DESTDIR=`cd $1;${PWDCMD}` # 404| export DESTDIR # 405| shift Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:419:3: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 417| # Check files which are symlinks as well as those which are files. # 418| # # 419|-> cd ${INPUT} # 420| required="$required `if $LINKS; then # 421| find ${FIND_BASE}/. -name '*.h' \( -type f -o -type l \) -print Error: SHELLCHECK_WARNING (CWE-456): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:433:5: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'. # 431| ## we might end up deleting some of these files "because they don't # 432| ## need any change." # 433|-> set x `echo $required` # 434| shift # 435| while [ $# != 0 ]; do Error: SHELLCHECK_WARNING (CWE-156): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:433:7: warning[SC2046]: Quote this to prevent word splitting. # 431| ## we might end up deleting some of these files "because they don't # 432| ## need any change." # 433|-> set x `echo $required` # 434| shift # 435| while [ $# != 0 ]; do Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:442:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 440| # $3 is the fixed file name. # 441| # # 442|-> cd ${INPUT} # 443| cd $1 # 444| if [ -f $2 ] ; then Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:443:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 441| # # 442| cd ${INPUT} # 443|-> cd $1 # 444| if [ -f $2 ] ; then # 445| if [ -r $2 ] && [ ! -r $3 ]; then Error: SHELLCHECK_WARNING (CWE-456): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:462:7: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'. # 460| shift; shift; shift # 461| done # 462|-> set x $newreq # 463| shift # 464| done Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:468:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 466| if test $VERBOSE -gt 2 # 467| then echo 'Cleaning up DONE files.' ; fi # 468|-> cd $LIB # 469| # Look for files case-insensitively, for the benefit of # 470| # DOS/Windows filesystems. Error: SHELLCHECK_WARNING (CWE-252): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:475:1: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 473| if test $VERBOSE -gt 1 # 474| then echo 'Cleaning up unneeded directories:' ; fi # 475|-> cd $LIB # 476| all_dirs=`find . -type d \! -name '.' -print | sort -r` # 477| for file in $all_dirs; do Error: SHELLCHECK_WARNING (CWE-156): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:497:13: warning[SC2046]: Quote this to prevent word splitting. # 495| rm -f $file # 496| test $VERBOSE -gt 3 && echo " removed $file" # 497|-> rmdir `dirname $file` > /dev/null && \ # 498| test $VERBOSE -gt 3 && \ # 499| echo " removed `dirname $file`" Error: SHELLCHECK_WARNING (CWE-398): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/fixinc.sh:505:26: warning[SC1010]: Use semicolon or linefeed before 'done' (or quote to make it literal). # 503| # 504| if test $VERBOSE -gt 0 # 505|-> then echo fixincludes is done ; fi # 506| # 507| # # # # # # # # # # # # # # # # # # # # # Error: SHELLCHECK_WARNING: /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/mkinstalldirs:33:12: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten. # 31| -h | --help | --h*) # -h for help # 32| echo "$usage" # 33|-> exit $? # 34| ;; # 35| -m) # -m PERM arg Error: SHELLCHECK_WARNING: /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/mkinstalldirs:43:12: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten. # 41| --version) # 42| echo "$0 $scriptversion" # 43|-> exit $? # 44| ;; # 45| --) # stop option processing Error: SHELLCHECK_WARNING (CWE-277): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/mkinstalldirs:93:14: warning[SC2174]: When used with -p, -m only applies to the deepest directory. # 91| ;; # 92| *) # 93|-> if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && # 94| test ! -d ./--version; then # 95| echo "mkdir -m $dirmode -p -- $*" Error: SHELLCHECK_WARNING (CWE-456): /usr/libexec/gcc/x86_64-redhat-linux/14/install-tools/mkinstalldirs:115:7: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'. # 113| oIFS=$IFS # 114| IFS=/ # 115|-> set fnord $file # 116| shift # 117| IFS=$oIFS Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:489: error[nullPointer]: Null pointer dereference: (int*)NULL # 487| signal (sig, term_signal); # 488| term = term + 1; # 489|-> if (term_pipe && term_pipe[1] >= 0) # 490| write (term_pipe[1], &term_pipe[1], 1); # 491| } Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:490: error[nullPointer]: Null pointer dereference: (int*)NULL # 488| term = term + 1; # 489| if (term_pipe && term_pipe[1] >= 0) # 490|-> write (term_pipe[1], &term_pipe[1], 1); # 491| } # 492| Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:651: error[nullPointer]: Null pointer dereference: (int*)NULL # 649| } # 650| # 651|-> if (term_pipe && term_pipe[0] >= 0) # 652| { # 653| FD_SET (term_pipe[0], &readers); Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:653: error[nullPointer]: Null pointer dereference: (int*)NULL # 651| if (term_pipe && term_pipe[0] >= 0) # 652| { # 653|-> FD_SET (term_pipe[0], &readers); # 654| if (unsigned (term_pipe[0]) >= limit) # 655| limit = term_pipe[0] + 1; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:654: error[nullPointer]: Null pointer dereference: (int*)NULL # 652| { # 653| FD_SET (term_pipe[0], &readers); # 654|-> if (unsigned (term_pipe[0]) >= limit) # 655| limit = term_pipe[0] + 1; # 656| } Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:655: error[nullPointer]: Null pointer dereference: (int*)NULL # 653| FD_SET (term_pipe[0], &readers); # 654| if (unsigned (term_pipe[0]) >= limit) # 655|-> limit = term_pipe[0] + 1; # 656| } # 657| Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:686: error[nullPointer]: Null pointer dereference: (int*)NULL # 684| event_count = select (limit, &readers, &writers, NULL, NULL); # 685| #endif # 686|-> if (term_pipe && FD_ISSET (term_pipe[0], &readers)) # 687| { # 688| /* Fake up an interrupted system call. */ Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:826: error[nullPointer]: Null pointer dereference: (int*)NULL # 824| close (epoll_fd); # 825| # 826|-> if (term_pipe && term_pipe[0] >= 0) # 827| { # 828| close (term_pipe[0]); Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:828: error[nullPointer]: Null pointer dereference: (int*)NULL # 826| if (term_pipe && term_pipe[0] >= 0) # 827| { # 828|-> close (term_pipe[0]); # 829| close (term_pipe[1]); # 830| } Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/c++tools/server.cc:829: error[nullPointer]: Null pointer dereference: (int*)NULL # 827| { # 828| close (term_pipe[0]); # 829|-> close (term_pipe[1]); # 830| } # 831| } Error: CLANG_WARNING: gcc-14.0.1-20240411/fixincludes/fixfixes.c:166:10: warning[deadcode.DeadStores]: Although the value stored to 'text' is used in the enclosing expression, the value is never actually read from 'text' # 164| } # 165| # 166|-> return text += rm[0].rm_eo; # 167| } # 168| Error: GCC_ANALYZER_WARNING: gcc-14.0.1-20240411/fixincludes/fixincl.c: scope_hint: In function ‘internal_fix’ gcc-14.0.1-20240411/fixincludes/fixincl.c:859:3: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’ # 857| * the new pipe become the stdout. # 858| */ # 859|-> dup2 (fd[1], STDOUT_FILENO); # 860| dup2 (read_fd, STDIN_FILENO); # 861| Error: GCC_ANALYZER_WARNING: gcc-14.0.1-20240411/fixincludes/fixincl.c:860:3: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’ # 858| */ # 859| dup2 (fd[1], STDOUT_FILENO); # 860|-> dup2 (read_fd, STDIN_FILENO); # 861| # 862| apply_fix (p_fixd, pz_curr_file); Error: GCC_ANALYZER_WARNING: gcc-14.0.1-20240411/fixincludes/procopen.c: scope_hint: In function ‘chain_open’ gcc-14.0.1-20240411/fixincludes/procopen.c:158:3: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’ # 156| * the new pipe become the stdout. # 157| */ # 158|-> dup2 (stdout_pair.write_fd, STDOUT_FILENO); # 159| dup2 (stdin_fd, STDIN_FILENO); # 160| Error: GCC_ANALYZER_WARNING: gcc-14.0.1-20240411/fixincludes/procopen.c:159:3: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’ # 157| */ # 158| dup2 (stdout_pair.write_fd, STDOUT_FILENO); # 159|-> dup2 (stdin_fd, STDIN_FILENO); # 160| # 161| if (*pp_args == (char *) NULL) Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/fixincludes/procopen.c: scope_hint: In function ‘proc2_open’ gcc-14.0.1-20240411/fixincludes/procopen.c:192:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘*p_pair.read_fd’ # 190| return NOPROCESS; # 191| # 192|-> p_pair->read_fd = chain_open (p_pair->read_fd, pp_args, &ch_id); # 193| if (ch_id == NOPROCESS) # 194| close (p_pair->write_fd); Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/fixincludes/procopen.c:192:19: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_pair.read_fd’ # 190| return NOPROCESS; # 191| # 192|-> p_pair->read_fd = chain_open (p_pair->read_fd, pp_args, &ch_id); # 193| if (ch_id == NOPROCESS) # 194| close (p_pair->write_fd); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:48: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:492: included_from: Included from here. gcc-14.0.1-20240411/gcc/align.h:33:16: warning[core.BitwiseShift]: Right operand is negative in left shift # 31| void normalize () # 32| { # 33|-> int n = (1 << log); # 34| if (maxskip > n) # 35| maxskip = n - 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/analyzer/access-diagram.cc:818:20: warning[cplusplus.Move]: Method called on moved-from object 't' # 816| m_theme (theme), # 817| m_col_widths (col_widths), # 818|-> m_row_heights (t.get_size ().h), # 819| m_cell_sizes (m_col_widths, m_row_heights), # 820| m_tg (m_table, m_cell_sizes) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/analyzer/diagnostic-manager.cc:2256:7: warning[core.CallAndMessage]: Called C++ object pointer is null # 2254| const region_model *dst_model = dst_state.m_region_model; # 2255| if (src_model->get_dynamic_extents () # 2256|-> != dst_model->get_dynamic_extents ()) # 2257| { # 2258| unsigned i; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/analyzer/program-state.cc:926:24: warning[cplusplus.NewDelete]: Use of memory after it is freed # 924| { # 925| delete m_region_model; # 926|-> m_region_model = new region_model (*other.m_region_model); # 927| # 928| int i; Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/analyzer/program-state.cc: scope_hint: In function ‘void ana::log_set_of_svalues(logger*, const char*, const svalue_set&)’ gcc-14.0.1-20240411/gcc/analyzer/program-state.cc:1498:15: warning[-Wformat-security]: format not a string literal and no format arguments # 1498 | logger->log (name); # | ~~~~~~~~~~~~^~~~~~ # 1496| const svalue_set &set) # 1497| { # 1498|-> logger->log (name); # 1499| logger->inc_indent (); # 1500| auto_vec<const svalue *> sval_vecs (set.elements ()); Error: COMPILER_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/analyzer/store.h:310:5: warning[-Wmaybe-uninitialized]: ‘size_in_bytes.generic_wide_int<fixed_wide_int_storage<128> >::fixed_wide_int_storage<128>.fixed_wide_int_storage<128>::val[1]’ may be used uninitialized # 310 | m_size_in_bytes (size_in_bytes) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/analyzer/access-diagram.cc: scope_hint: In member function ‘virtual text_art::table ana::string_literal_spatial_item::make_table(const ana::bit_to_table_map&, text_art::style_manager&) const’ gcc-14.0.1-20240411/gcc/analyzer/access-diagram.cc:1811:28: note: ‘size_in_bytes.generic_wide_int<fixed_wide_int_storage<128> >::fixed_wide_int_storage<128>.fixed_wide_int_storage<128>::val[1]’ was declared here # 1811 | byte_size_t size_in_bytes # | ^~~~~~~~~~~~~ # 308| byte_range (byte_offset_t start_byte_offset, byte_size_t size_in_bytes) # 309| : m_start_byte_offset (start_byte_offset), # 310|-> m_size_in_bytes (size_in_bytes) # 311| {} # 312| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/analyzer/supergraph.cc:1389:10: warning[core.NullDereference]: Dereference of null pointer # 1387| if (TREE_CODE (callee_expr) == SSA_NAME # 1388| && SSA_NAME_IS_DEFAULT_DEF (callee_expr) # 1389|-> && TREE_CODE (SSA_NAME_VAR (callee_expr)) == PARM_DECL) # 1390| return get_arg_for_parm (SSA_NAME_VAR (callee_expr), out); # 1391| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/graph.cc:25: included_from: Included from here. gcc-14.0.1-20240411/gcc/backend.h:32: included_from: Included from here. gcc-14.0.1-20240411/gcc/basic-block.h:375:10: warning[core.NullDereference]: Dereference of null pointer (loaded from field 'container') # 373| { # 374| gcc_checking_assert (i.container); # 375|-> return *i.container; # 376| } # 377| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/bb-reorder.cc:2025:16: warning[deadcode.DeadStores]: Value stored to 'j' during its initialization is never read # 2023| fallthrough edge, we need to restore it again. # 2024| See PR108596. */ # 2025|-> rtx_insn *j = BB_END (cur_bb); # 2026| gcc_checking_assert (JUMP_P (j) # 2027| && (asm_noperands (PATTERN (j)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/bb-reorder.cc:2190:17: warning[core.NullDereference]: Access to field 'code' results in a dereference of a null pointer (loaded from variable 'old_label') # 2188| emit_label (new_label); # 2189| # 2190|-> gcc_assert (GET_CODE (old_label) == LABEL_REF); # 2191| old_jump_target = old_jump_insn->jump_target (); # 2192| new_jump = as_a <rtx_jump_insn *> Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/bb-reorder.cc:2311:31: warning[core.NullDereference]: Dereference of null pointer # 2309| delete_insn (last_insn); # 2310| # 2311|-> JUMP_LABEL (jump_insn) = label; # 2312| LABEL_NUSES (label)++; # 2313| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/bitmap.cc:542:19: warning[deadcode.DeadStores]: Value stored to 't' during its initialization is never read # 540| bitmap_tree_unlink_element (bitmap head, bitmap_element *e) # 541| { # 542|-> bitmap_element *t = bitmap_tree_splay (head, head->first, e->indx); # 543| # 544| gcc_checking_assert (t == e); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/bitmap.cc:605:3: warning[deadcode.DeadStores]: Value stored to 't' is never read # 603| erb = e->next; # 604| e->next = NULL; # 605|-> t = bitmap_tree_splay (head, head->first, e->indx); # 606| gcc_checking_assert (t == e); # 607| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ada-spec.cc:1139:4: warning[deadcode.DeadStores]: Value stored to 'found' is never read # 1137| s[len2++] = 'c'; # 1138| s[len2++] = '_'; # 1139|-> found = true; # 1140| break; # 1141| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ada-spec.cc:3259:28: warning[core.NullDereference]: Dereference of null pointer # 3257| if (TREE_CODE (t) == TYPE_DECL) # 3258| { # 3259|-> const bool is_subtype = TYPE_NAME (orig); # 3260| # 3261| if (!is_subtype && TREE_CODE (TREE_TYPE (t)) == UNION_TYPE) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c-family/c-common.cc: scope_hint: In function ‘void c_parse_error(const char*, cpp_ttype, tree, unsigned char, rich_location*)’ gcc-14.0.1-20240411/gcc/c-family/c-common.cc:6763:14: warning[-Wformat-security]: format not a string literal and no format arguments # 6763 | error_at (richloc, gmsgid); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~ # 6761| } # 6762| else # 6763|-> error_at (richloc, gmsgid); # 6764| # 6765| if (message) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c-family/c-common.cc:6767:16: warning[-Wformat-security]: format not a string literal and no format arguments # 6767 | error_at (richloc, message); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~~ # 6765| if (message) # 6766| { # 6767|-> error_at (richloc, message); # 6768| free (message); # 6769| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ppoutput.cc:284:4: warning[deadcode.DeadStores]: Value stored to 'line_marker_emitted' is never read # 282| const char *name; # 283| # 284|-> line_marker_emitted = maybe_print_line (token->src_loc); # 285| fputs ("#pragma ", print.outf); # 286| c_pp_lookup_pragma (token->val.pragma, &space, &name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ppoutput.cc:316:4: warning[deadcode.DeadStores]: Value stored to 'line_marker_emitted' is never read # 314| new system-ness before we emit the token. */ # 315| { # 316|-> line_marker_emitted = do_line_change (pfile, token, loc, false); # 317| } # 318| if (!in_pragma || should_output_pragmas ()) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ubsan.cc:49:8: warning[deadcode.DeadStores]: Value stored to 'top0' during its initialization is never read # 47| because they are already converted to RESULT_TYPE. # 48| Use TYPE_MAIN_VARIANT since typedefs can confuse us. */ # 49|-> tree top0 = TYPE_MAIN_VARIANT (type); # 50| tree top1 = TYPE_MAIN_VARIANT (TREE_TYPE (op1)); # 51| gcc_checking_assert (lang_hooks.types_compatible_p (top0, top1)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-ubsan.cc:50:8: warning[deadcode.DeadStores]: Value stored to 'top1' during its initialization is never read # 48| Use TYPE_MAIN_VARIANT since typedefs can confuse us. */ # 49| tree top0 = TYPE_MAIN_VARIANT (type); # 50|-> tree top1 = TYPE_MAIN_VARIANT (TREE_TYPE (op1)); # 51| gcc_checking_assert (lang_hooks.types_compatible_p (top0, top1)); # 52| Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c/c-convert.cc: scope_hint: In function ‘tree_node* c_convert(tree, tree, bool)’ gcc-14.0.1-20240411/gcc/c/c-convert.cc:84:13: warning[-Wformat-security]: format not a string literal and no format arguments # 84 | error (invalid_conv_diag); # | ~~~~~~^~~~~~~~~~~~~~~~~~~ # 82| = targetm.invalid_conversion (TREE_TYPE (expr), type))) # 83| { # 84|-> error (invalid_conv_diag); # 85| return error_mark_node; # 86| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c/c-typeck.cc: scope_hint: In function ‘int convert_arguments(location_t, vec<unsigned int>, tree, vec<tree_node*, va_gc>*, vec<tree_node*, va_gc>*, tree, tree)’ gcc-14.0.1-20240411/gcc/c/c-typeck.cc:3878:17: warning[-Wformat-security]: format not a string literal and no format arguments # 3878 | error (invalid_func_diag); # | ~~~~~~^~~~~~~~~~~~~~~~~~~ # 3876| targetm.calls.invalid_arg_for_unprototyped_fn (typelist, fundecl, val))) # 3877| { # 3878|-> error (invalid_func_diag); # 3879| return -1; # 3880| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c/c-typeck.cc: scope_hint: In function ‘tree_node* build_unary_op(location_t, tree_code, tree, bool)’ gcc-14.0.1-20240411/gcc/c/c-typeck.cc:4648:16: warning[-Wformat-security]: format not a string literal and no format arguments # 4648 | error_at (location, invalid_op_diag); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 4646| = targetm.invalid_unary_op (code, TREE_TYPE (xarg)))) # 4647| { # 4648|-> error_at (location, invalid_op_diag); # 4649| return error_mark_node; # 4650| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c/c-typeck.cc: scope_hint: In function ‘void warning_init(location_t, int, const char*)’ gcc-14.0.1-20240411/gcc/c/c-typeck.cc:6913:23: warning[-Wformat-security]: format not a string literal and no format arguments # 6913 | warned = warning_at (exploc, opt, gmsgid); # | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ # 6911| # 6912| /* The gmsgid may be a format string with %< and %>. */ # 6913|-> warned = warning_at (exploc, opt, gmsgid); # 6914| ofwhat = print_spelling ((char *) alloca (spelling_length () + 1)); # 6915| if (*ofwhat && warned) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/c/c-typeck.cc: scope_hint: In function ‘tree_node* build_binary_op(location_t, tree_code, tree, tree, bool)’ gcc-14.0.1-20240411/gcc/c/c-typeck.cc:12453:16: warning[-Wformat-security]: format not a string literal and no format arguments #12453 | error_at (location, invalid_op_diag); # | ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ #12451| = targetm.invalid_binary_op (code, type0, type1))) #12452| { #12453|-> error_at (location, invalid_op_diag); #12454| return error_mark_node; #12455| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:617:12: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from field 'current_bb') # 615| last_basic_block_for_fn (cfun) = index + 1; # 616| n_basic_blocks_for_fn (cfun)++; # 617|-> if (parser.current_bb->index == ENTRY_BLOCK) # 618| parser.push_edge (ENTRY_BLOCK, bb->index, EDGE_FALLTHRU, # 619| profile_probability::always ()); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:735:10: warning[core.NullDereference]: Dereference of null pointer # 733| /* GIMPLE call statement without LHS. */ # 734| if (c_parser_next_token_is (parser, CPP_SEMICOLON) # 735|-> && TREE_CODE (lhs.value) == CALL_EXPR) # 736| { # 737| gimple *call; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:884:12: warning[core.NullDereference]: Dereference of null pointer # 882| /* If we parsed a comparison or an identifier and the next token # 883| is a '?' then parse a conditional expression. */ # 884|-> if ((COMPARISON_CLASS_P (rhs.value) # 885| || SSA_VAR_P (rhs.value)) # 886| && c_parser_next_token_is (parser, CPP_QUERY)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:2254:12: warning[core.NullDereference]: Dereference of null pointer # 2252| = c_parser_gimple_binary_expression (parser, boolean_type_node).value; # 2253| if (cond != error_mark_node # 2254|-> && ! COMPARISON_CLASS_P (cond) # 2255| && ! CONSTANT_CLASS_P (cond) # 2256| && ! SSA_VAR_P (cond)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/caller-save.cc:1205:25: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 1203| # 1204| mem = regno_save_mem [regno][numregs]; # 1205|-> if (save_mode [regno] != VOIDmode # 1206| && save_mode [regno] != GET_MODE (mem) # 1207| && numregs == hard_regno_nregs (regno, save_mode [regno]) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/calls.cc:529:7: warning[deadcode.DeadStores]: Value stored to 'rounded_stack_size_rtx' is never read # 527| CALL_INSN_FUNCTION_USAGE (call_insn)); # 528| rounded_stack_size -= n_popped; # 529|-> rounded_stack_size_rtx = gen_int_mode (rounded_stack_size, Pmode); # 530| stack_pointer_delta -= n_popped; # 531| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/calls.cc:2451:15: warning[core.NullDereference]: Access to field 'code' results in a dereference of a null pointer (loaded from variable 'value') # 2449| shift_return_value (machine_mode mode, bool left_p, rtx value) # 2450| { # 2451|-> gcc_assert (REG_P (value) && HARD_REGISTER_P (value)); # 2452| machine_mode value_mode = GET_MODE (value); # 2453| poly_int64 shift = GET_MODE_BITSIZE (value_mode) - GET_MODE_BITSIZE (mode); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ccmp.cc:252:18: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 250| if (cost2 < cost1) # 251| { # 252|-> *prep_seq = prep_seq_2; # 253| *gen_seq = gen_seq_2; # 254| return ret2; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cfghooks.cc:955:11: warning[core.NullDereference]: Access to field 'header' results in a dereference of a null pointer (loaded from variable 'loop') # 953| loop analysis). */ # 954| loop = dummy->loop_father; # 955|-> if (loop->header == dummy # 956| && loop->latch != NULL # 957| && find_edge (loop->latch, dummy) == NULL) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cfghooks.cc:1419:7: warning[deadcode.DeadStores]: Value stored to 'bb' is never read # 1417| edge_iterator ei; # 1418| new_bb = new_bbs[i]; # 1419|-> bb = bbs[i]; # 1420| # 1421| FOR_EACH_EDGE (e, ei, new_bb->succs) Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/cfgloop.h:540: error[ctunullpointer]: Null pointer dereference: loop # 538| loop_depth (const class loop *loop) # 539| { # 540|-> return vec_safe_length (loop->superloops); # 541| } # 542| Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/cfgloop.h:540: warning[nullPointer]: Possible null pointer dereference: loop # 538| loop_depth (const class loop *loop) # 539| { # 540|-> return vec_safe_length (loop->superloops); # 541| } # 542| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cfgloopanal.cc:252:2: warning[deadcode.DeadStores]: Value stored to 'found_latch' is never read # 250| count_in += e->count (); # 251| else # 252|-> found_latch = true; # 253| else # 254| FOR_EACH_EDGE (e, ei, loop->header->preds) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cfgloopanal.cc:258:2: warning[deadcode.DeadStores]: Value stored to 'found_latch' is never read # 256| count_in += e->count (); # 257| else # 258|-> found_latch = true; # 259| gcc_checking_assert (found_latch); # 260| return count_in; Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/collect-utils.cc: scope_hint: In function ‘pex_obj* collect_execute(const char*, char**, const char*, const char*, int, bool, const char*)’ gcc-14.0.1-20240411/gcc/collect-utils.cc:237:21: warning[-Wformat-security]: format not a string literal and no format arguments # 237 | fatal_error (input_location, errmsg); # | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # 235| } # 236| else # 237|-> fatal_error (input_location, errmsg); # 238| } # 239| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/collect2.cc:2053:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 2051| /* q points to null at end of the string (or . of the .so version) */ # 2052| prefix = XNEWVEC (char, q - p + 1); # 2053|-> strncpy (prefix, p, q - p); # 2054| prefix[q - p] = 0; # 2055| for (r = prefix; *r; r++) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/collect2.cc: scope_hint: In function ‘void scan_prog_file(const char*, scanpass, scanfilter)’ gcc-14.0.1-20240411/gcc/collect2.cc:2401:21: warning[-Wformat-security]: format not a string literal and no format arguments # 2401 | fatal_error (input_location, errmsg); # | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # 2399| } # 2400| else # 2401|-> fatal_error (input_location, errmsg); # 2402| } # 2403| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/compare-elim.cc:509:13: warning[deadcode.DeadStores]: Value stored to 'n' during its initialization is never read # 507| { # 508| machine_mode sel_mode; # 509|-> const int n = cmp->n_uses; # 510| rtx flags = NULL; # 511| Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/gcn-run.cc: scope_hint: In function ‘main’ gcc-14.0.1-20240411/gcc/config/gcn/gcn-run.cc:684:13: warning[-Wpedantic]: a member of a structure or union cannot have a variably modified type # 684 | int64_t argv_data[kernel_argc]; # | ^~~~~~~~~ # 682| struct argdata # 683| { # 684|-> int64_t argv_data[kernel_argc]; # 685| char strings[args_size]; # 686| } *args = device_malloc (sizeof (struct argdata), kernargs_region); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/gcn-run.cc:685:10: warning[-Wpedantic]: a member of a structure or union cannot have a variably modified type # 685 | char strings[args_size]; # | ^~~~~~~ # 683| { # 684| int64_t argv_data[kernel_argc]; # 685|-> char strings[args_size]; # 686| } *args = device_malloc (sizeof (struct argdata), kernargs_region); # 687| Error: COMPILER_WARNING (CWE-674): gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md: scope_hint: In function ‘rtx_def* gen_vec_cmpuv2hidi_exec(rtx, rtx, rtx, rtx, rtx)’ gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md:3801:1: warning[-Winfinite-recursion]: infinite recursion detected # 3801 | [(match_operand:DI 0 "register_operand") # | ^ ~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md:3811:15: note: recursive call # 3811 | emit_insn (gen_vec_cmpu<mode>di_exec (operands[0], operands[1], # | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 3812 | operands[2], operands[3], # | ~~~~~~~~~~~~~~~~~~~~~~~~~ # 3813 | operands[4])); # | ~~~~~~~~~~~~~ # 3799| # 3800| (define_expand "vec_cmpu<mode>di_exec" # 3801|-> [(match_operand:DI 0 "register_operand") # 3802| (match_operator 1 "gcn_compare_operator" # 3803| [(match_operand:V_INT_noQI 2 "gcn_alu_operand") Error: COMPILER_WARNING (CWE-674): gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md: scope_hint: In function ‘rtx_def* gen_vec_cmpuv2sidi_exec(rtx, rtx, rtx, rtx, rtx)’ gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md:3841:8: warning[-Winfinite-recursion]: infinite recursion detected # 3841 | (match_operand:<SCALAR_MODE> 2 "gcn_alu_operand" # | ^ ~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/config/gcn/gcn-valu.md:3811:15: note: recursive call # 3811 | emit_insn (gen_vec_cmpu<mode>di_exec (operands[0], operands[1], # | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 3812 | operands[2], operands[3], # | ~~~~~~~~~~~~~~~~~~~~~~~~~ # 3813 | operands[4])); # | ~~~~~~~~~~~~~ # 3839| (match_operator:DI 1 "gcn_fp_compare_operator" # 3840| [(vec_duplicate:V_noQI # 3841|-> (match_operand:<SCALAR_MODE> 2 "gcn_alu_operand" # 3842| " Sv, B,Sv,B, A,Sv,B")) # 3843| (match_operand:V_noQI 3 "gcn_vop3_operand" " v, v, v,v, v, v,v")])) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/config/gcn/gcn.cc:7793:19: warning[-Wformat-security]: format not a string literal and no format arguments # 7793 | fprintf (file, str); # | ~~~~~~~~^~~~~~~~~~~ # 7791| break; # 7792| } # 7793|-> fprintf (file, str); # 7794| return; # 7795| } Error: COMPILER_WARNING (CWE-569): gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/tm.h:23: included_from: Included from here. gcc-14.0.1-20240411/gcc/backend.h:28: included_from: Included from here. gcc-14.0.1-20240411/gcc/config/gcn/gcn.cc:25: included_from: Included from here. gcc-14.0.1-20240411/gcc/config/gcn/gcn.cc: scope_hint: In function ‘bool gcn_hard_regno_mode_ok(unsigned int, machine_mode)’ gcc-14.0.1-20240411/gcc/config/gcn/gcn.h:202:38: warning[-Wtype-limits]: comparison of unsigned expression in ‘>= 0’ is always true # 202 | #define SGPR_REGNO_P(N) ((N) >= FIRST_SGPR_REG && (N) <= LAST_SGPR_REG) # | ^ gcc-14.0.1-20240411/gcc/config/gcn/gcn.cc:621:7: note: in expansion of macro ‘SGPR_REGNO_P’ # 621 | if (SGPR_REGNO_P (regno)) # | ^~~~~~~~~~~~ # 200| #define HARD_FRAME_POINTER_IS_FRAME_POINTER 0 # 201| # 202|-> #define SGPR_REGNO_P(N) ((N) >= FIRST_SGPR_REG && (N) <= LAST_SGPR_REG) # 203| #define VGPR_REGNO_P(N) ((N) >= FIRST_VGPR_REG && (N) <= LAST_VGPR_REG) # 204| #define AVGPR_REGNO_P(N) ((N) >= FIRST_AVGPR_REG && (N) <= LAST_AVGPR_REG) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:231:12: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 229| unsigned num = 1, i; # 230| # 231|-> curval = strchr (str, ':'); # 232| while (curval) # 233| { Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc: scope_hint: In function ‘void process_asm(FILE*, FILE*, FILE*)’ gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:525:30: warning[-Wformat=]: ISO C++11 does not support the 'm' scanf flag # 525 | if (sscanf (buf, " ;; OPENACC-DIMS: %d, %d, %d : %ms\n", # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 523| case IN_CODE: # 524| { # 525|-> if (sscanf (buf, " ;; OPENACC-DIMS: %d, %d, %d : %ms\n", # 526| &dim.d[0], &dim.d[1], &dim.d[2], &dim.name) == 4) # 527| { Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:536:30: warning[-Wformat=]: ISO C++11 does not support the 'm' scanf flag # 536 | if (sscanf (buf, " - .name: %ms\n", ®count.kernel_name) == 1) # | ^~~~~~~~~~~~~~~~~ # 534| case IN_METADATA: # 535| { # 536|-> if (sscanf (buf, " - .name: %ms\n", ®count.kernel_name) == 1) # 537| break; # 538| else if (sscanf (buf, " .sgpr_count: %d\n", Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:557:30: warning[-Wformat=]: ISO C++11 does not support the 'm' scanf flag # 557 | if (sscanf (buf, " .8byte %ms\n", &varname)) # | ^~~~~~~~~~~~~~~ # 555| char *varname; # 556| unsigned varsize; # 557|-> if (sscanf (buf, " .8byte %ms\n", &varname)) # 558| { # 559| fputs (buf, out); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:570:30: warning[-Wformat=]: ISO C++11 does not support the 'm' scanf flag # 570 | if (sscanf (buf, "\t.8byte\t%ms\n", &funcname)) # | ^~~~~~~~~~~~~~~~~ # 568| { # 569| char *funcname; # 570|-> if (sscanf (buf, "\t.8byte\t%ms\n", &funcname)) # 571| { # 572| fputs (buf, out); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:582:30: warning[-Wformat=]: ISO C++11 does not support the 'm' scanf flag # 582 | if (sscanf (buf, "\t.8byte\t%ms\n", &funcname)) # | ^~~~~~~~~~~~~~~~~ # 580| { # 581| char *funcname; # 582|-> if (sscanf (buf, "\t.8byte\t%ms\n", &funcname)) # 583| { # 584| fputs (buf, out); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:910:9: warning[deadcode.DeadStores]: Value stored to 'in' during its initialization is never read # 908| main (int argc, char **argv) # 909| { # 910|-> FILE *in = stdin; # 911| FILE *out = stdout; # 912| FILE *cfile = stdout; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:911:9: warning[deadcode.DeadStores]: Value stored to 'out' during its initialization is never read # 909| { # 910| FILE *in = stdin; # 911|-> FILE *out = stdout; # 912| FILE *cfile = stdout; # 913| const char *outname = 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:912:9: warning[deadcode.DeadStores]: Value stored to 'cfile' during its initialization is never read # 910| FILE *in = stdin; # 911| FILE *out = stdout; # 912|-> FILE *cfile = stdout; # 913| const char *outname = 0; # 914| const char *with_arch_str = NULL; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc: scope_hint: In function ‘int main(int, char**)’ gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:1202:40: warning[-Wformat-overflow=]: ‘sprintf’ may write a terminating nul past the end of the destination # 1202 | sprintf (buf, "%d", dbgcount++); # | ^ gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:1202:31: note: ‘sprintf’ output between 2 and 11 bytes into a destination of size 10 # 1202 | sprintf (buf, "%d", dbgcount++); # | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ # 1200| { # 1201| char buf[10]; # 1202|-> sprintf (buf, "%d", dbgcount++); # 1203| dbgobj = concat (dumppfx, ".mkoffload.dbg", buf, ".o", NULL); # 1204| } Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc: scope_hint: In function ‘int main(int, char**)’ gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:1281:51: warning[-Wformat-diag]: unquoted identifier or keyword ‘omp_requires’ in format # 1281 | fatal_error (input_location, "cannot open omp_requires file %qs", # | ^~~~~~~~~~~~ # 1279| in = fopen (omp_requires_file, "rb"); # 1280| if (!in) # 1281|-> fatal_error (input_location, "cannot open omp_requires file %qs", # 1282| omp_requires_file); # 1283| uint32_t omp_requires; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:1285:51: warning[-Wformat-diag]: unquoted identifier or keyword ‘omp_requires’ in format # 1285 | fatal_error (input_location, "cannot read omp_requires file %qs", # | ^~~~~~~~~~~~ # 1283| uint32_t omp_requires; # 1284| if (fread (&omp_requires, sizeof (omp_requires), 1, in) != 1) # 1285|-> fatal_error (input_location, "cannot read omp_requires file %qs", # 1286| omp_requires_file); # 1287| fclose (in); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:1291:68: warning[-Wformat-diag]: unquoted keyword ‘asm’ in format # 1291 | fatal_error (input_location, "cannot open intermediate gcn asm file"); # | ^~~ # 1289| in = fopen (gcn_s1_name, "r"); # 1290| if (!in) # 1291|-> fatal_error (input_location, "cannot open intermediate gcn asm file"); # 1292| # 1293| out = fopen (gcn_s2_name, "w"); Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:84: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 82| DEF_PTA(AVX512VPOPCNTDQ) # 83| DEF_PTA(SGX) # 84|-> DEF_PTA(AVX512VNNI) # 85| DEF_PTA(GFNI) # 86| DEF_PTA(VAES) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:85: error[shiftTooManyBits]: Shifting 64-bit value by 65 bits is undefined behaviour # 83| DEF_PTA(SGX) # 84| DEF_PTA(AVX512VNNI) # 85|-> DEF_PTA(GFNI) # 86| DEF_PTA(VAES) # 87| DEF_PTA(AVX512VBMI2) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:86: error[shiftTooManyBits]: Shifting 64-bit value by 66 bits is undefined behaviour # 84| DEF_PTA(AVX512VNNI) # 85| DEF_PTA(GFNI) # 86|-> DEF_PTA(VAES) # 87| DEF_PTA(AVX512VBMI2) # 88| DEF_PTA(VPCLMULQDQ) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:87: error[shiftTooManyBits]: Shifting 64-bit value by 67 bits is undefined behaviour # 85| DEF_PTA(GFNI) # 86| DEF_PTA(VAES) # 87|-> DEF_PTA(AVX512VBMI2) # 88| DEF_PTA(VPCLMULQDQ) # 89| DEF_PTA(AVX512BITALG) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:88: error[shiftTooManyBits]: Shifting 64-bit value by 68 bits is undefined behaviour # 86| DEF_PTA(VAES) # 87| DEF_PTA(AVX512VBMI2) # 88|-> DEF_PTA(VPCLMULQDQ) # 89| DEF_PTA(AVX512BITALG) # 90| DEF_PTA(RDPID) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:89: error[shiftTooManyBits]: Shifting 64-bit value by 69 bits is undefined behaviour # 87| DEF_PTA(AVX512VBMI2) # 88| DEF_PTA(VPCLMULQDQ) # 89|-> DEF_PTA(AVX512BITALG) # 90| DEF_PTA(RDPID) # 91| DEF_PTA(PCONFIG) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:90: error[shiftTooManyBits]: Shifting 64-bit value by 70 bits is undefined behaviour # 88| DEF_PTA(VPCLMULQDQ) # 89| DEF_PTA(AVX512BITALG) # 90|-> DEF_PTA(RDPID) # 91| DEF_PTA(PCONFIG) # 92| DEF_PTA(WBNOINVD) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:91: error[shiftTooManyBits]: Shifting 64-bit value by 71 bits is undefined behaviour # 89| DEF_PTA(AVX512BITALG) # 90| DEF_PTA(RDPID) # 91|-> DEF_PTA(PCONFIG) # 92| DEF_PTA(WBNOINVD) # 93| DEF_PTA(AVX512VP2INTERSECT) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:92: error[shiftTooManyBits]: Shifting 64-bit value by 72 bits is undefined behaviour # 90| DEF_PTA(RDPID) # 91| DEF_PTA(PCONFIG) # 92|-> DEF_PTA(WBNOINVD) # 93| DEF_PTA(AVX512VP2INTERSECT) # 94| DEF_PTA(PTWRITE) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:93: error[shiftTooManyBits]: Shifting 64-bit value by 73 bits is undefined behaviour # 91| DEF_PTA(PCONFIG) # 92| DEF_PTA(WBNOINVD) # 93|-> DEF_PTA(AVX512VP2INTERSECT) # 94| DEF_PTA(PTWRITE) # 95| DEF_PTA(AVX512BF16) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:94: error[shiftTooManyBits]: Shifting 64-bit value by 74 bits is undefined behaviour # 92| DEF_PTA(WBNOINVD) # 93| DEF_PTA(AVX512VP2INTERSECT) # 94|-> DEF_PTA(PTWRITE) # 95| DEF_PTA(AVX512BF16) # 96| DEF_PTA(WAITPKG) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:95: error[shiftTooManyBits]: Shifting 64-bit value by 75 bits is undefined behaviour # 93| DEF_PTA(AVX512VP2INTERSECT) # 94| DEF_PTA(PTWRITE) # 95|-> DEF_PTA(AVX512BF16) # 96| DEF_PTA(WAITPKG) # 97| DEF_PTA(MOVDIRI) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:96: error[shiftTooManyBits]: Shifting 64-bit value by 76 bits is undefined behaviour # 94| DEF_PTA(PTWRITE) # 95| DEF_PTA(AVX512BF16) # 96|-> DEF_PTA(WAITPKG) # 97| DEF_PTA(MOVDIRI) # 98| DEF_PTA(MOVDIR64B) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:97: error[shiftTooManyBits]: Shifting 64-bit value by 77 bits is undefined behaviour # 95| DEF_PTA(AVX512BF16) # 96| DEF_PTA(WAITPKG) # 97|-> DEF_PTA(MOVDIRI) # 98| DEF_PTA(MOVDIR64B) # 99| DEF_PTA(ENQCMD) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:98: error[shiftTooManyBits]: Shifting 64-bit value by 78 bits is undefined behaviour # 96| DEF_PTA(WAITPKG) # 97| DEF_PTA(MOVDIRI) # 98|-> DEF_PTA(MOVDIR64B) # 99| DEF_PTA(ENQCMD) # 100| DEF_PTA(CLDEMOTE) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:99: error[shiftTooManyBits]: Shifting 64-bit value by 79 bits is undefined behaviour # 97| DEF_PTA(MOVDIRI) # 98| DEF_PTA(MOVDIR64B) # 99|-> DEF_PTA(ENQCMD) # 100| DEF_PTA(CLDEMOTE) # 101| DEF_PTA(SERIALIZE) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:100: error[shiftTooManyBits]: Shifting 64-bit value by 80 bits is undefined behaviour # 98| DEF_PTA(MOVDIR64B) # 99| DEF_PTA(ENQCMD) # 100|-> DEF_PTA(CLDEMOTE) # 101| DEF_PTA(SERIALIZE) # 102| DEF_PTA(TSXLDTRK) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:101: error[shiftTooManyBits]: Shifting 64-bit value by 81 bits is undefined behaviour # 99| DEF_PTA(ENQCMD) # 100| DEF_PTA(CLDEMOTE) # 101|-> DEF_PTA(SERIALIZE) # 102| DEF_PTA(TSXLDTRK) # 103| DEF_PTA(AMX_TILE) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:102: error[shiftTooManyBits]: Shifting 64-bit value by 82 bits is undefined behaviour # 100| DEF_PTA(CLDEMOTE) # 101| DEF_PTA(SERIALIZE) # 102|-> DEF_PTA(TSXLDTRK) # 103| DEF_PTA(AMX_TILE) # 104| DEF_PTA(AMX_INT8) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:103: error[shiftTooManyBits]: Shifting 64-bit value by 83 bits is undefined behaviour # 101| DEF_PTA(SERIALIZE) # 102| DEF_PTA(TSXLDTRK) # 103|-> DEF_PTA(AMX_TILE) # 104| DEF_PTA(AMX_INT8) # 105| DEF_PTA(AMX_BF16) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:104: error[shiftTooManyBits]: Shifting 64-bit value by 84 bits is undefined behaviour # 102| DEF_PTA(TSXLDTRK) # 103| DEF_PTA(AMX_TILE) # 104|-> DEF_PTA(AMX_INT8) # 105| DEF_PTA(AMX_BF16) # 106| DEF_PTA(UINTR) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:105: error[shiftTooManyBits]: Shifting 64-bit value by 85 bits is undefined behaviour # 103| DEF_PTA(AMX_TILE) # 104| DEF_PTA(AMX_INT8) # 105|-> DEF_PTA(AMX_BF16) # 106| DEF_PTA(UINTR) # 107| DEF_PTA(HRESET) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:106: error[shiftTooManyBits]: Shifting 64-bit value by 86 bits is undefined behaviour # 104| DEF_PTA(AMX_INT8) # 105| DEF_PTA(AMX_BF16) # 106|-> DEF_PTA(UINTR) # 107| DEF_PTA(HRESET) # 108| DEF_PTA(KL) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:107: error[shiftTooManyBits]: Shifting 64-bit value by 87 bits is undefined behaviour # 105| DEF_PTA(AMX_BF16) # 106| DEF_PTA(UINTR) # 107|-> DEF_PTA(HRESET) # 108| DEF_PTA(KL) # 109| DEF_PTA(WIDEKL) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:108: error[shiftTooManyBits]: Shifting 64-bit value by 88 bits is undefined behaviour # 106| DEF_PTA(UINTR) # 107| DEF_PTA(HRESET) # 108|-> DEF_PTA(KL) # 109| DEF_PTA(WIDEKL) # 110| DEF_PTA(AVXVNNI) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:109: error[shiftTooManyBits]: Shifting 64-bit value by 89 bits is undefined behaviour # 107| DEF_PTA(HRESET) # 108| DEF_PTA(KL) # 109|-> DEF_PTA(WIDEKL) # 110| DEF_PTA(AVXVNNI) # 111| DEF_PTA(AVX512FP16) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:110: error[shiftTooManyBits]: Shifting 64-bit value by 90 bits is undefined behaviour # 108| DEF_PTA(KL) # 109| DEF_PTA(WIDEKL) # 110|-> DEF_PTA(AVXVNNI) # 111| DEF_PTA(AVX512FP16) # 112| DEF_PTA(AVXIFMA) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:111: error[shiftTooManyBits]: Shifting 64-bit value by 91 bits is undefined behaviour # 109| DEF_PTA(WIDEKL) # 110| DEF_PTA(AVXVNNI) # 111|-> DEF_PTA(AVX512FP16) # 112| DEF_PTA(AVXIFMA) # 113| DEF_PTA(AVXVNNIINT8) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:112: error[shiftTooManyBits]: Shifting 64-bit value by 92 bits is undefined behaviour # 110| DEF_PTA(AVXVNNI) # 111| DEF_PTA(AVX512FP16) # 112|-> DEF_PTA(AVXIFMA) # 113| DEF_PTA(AVXVNNIINT8) # 114| DEF_PTA(AVXNECONVERT) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:113: error[shiftTooManyBits]: Shifting 64-bit value by 93 bits is undefined behaviour # 111| DEF_PTA(AVX512FP16) # 112| DEF_PTA(AVXIFMA) # 113|-> DEF_PTA(AVXVNNIINT8) # 114| DEF_PTA(AVXNECONVERT) # 115| DEF_PTA(CMPCCXADD) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:114: error[shiftTooManyBits]: Shifting 64-bit value by 94 bits is undefined behaviour # 112| DEF_PTA(AVXIFMA) # 113| DEF_PTA(AVXVNNIINT8) # 114|-> DEF_PTA(AVXNECONVERT) # 115| DEF_PTA(CMPCCXADD) # 116| DEF_PTA(AMX_FP16) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:115: error[shiftTooManyBits]: Shifting 64-bit value by 95 bits is undefined behaviour # 113| DEF_PTA(AVXVNNIINT8) # 114| DEF_PTA(AVXNECONVERT) # 115|-> DEF_PTA(CMPCCXADD) # 116| DEF_PTA(AMX_FP16) # 117| DEF_PTA(PREFETCHI) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:116: error[shiftTooManyBits]: Shifting 64-bit value by 96 bits is undefined behaviour # 114| DEF_PTA(AVXNECONVERT) # 115| DEF_PTA(CMPCCXADD) # 116|-> DEF_PTA(AMX_FP16) # 117| DEF_PTA(PREFETCHI) # 118| DEF_PTA(RAOINT) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:117: error[shiftTooManyBits]: Shifting 64-bit value by 97 bits is undefined behaviour # 115| DEF_PTA(CMPCCXADD) # 116| DEF_PTA(AMX_FP16) # 117|-> DEF_PTA(PREFETCHI) # 118| DEF_PTA(RAOINT) # 119| DEF_PTA(AMX_COMPLEX) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:118: error[shiftTooManyBits]: Shifting 64-bit value by 98 bits is undefined behaviour # 116| DEF_PTA(AMX_FP16) # 117| DEF_PTA(PREFETCHI) # 118|-> DEF_PTA(RAOINT) # 119| DEF_PTA(AMX_COMPLEX) # 120| DEF_PTA(AVXVNNIINT16) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:119: error[shiftTooManyBits]: Shifting 64-bit value by 99 bits is undefined behaviour # 117| DEF_PTA(PREFETCHI) # 118| DEF_PTA(RAOINT) # 119|-> DEF_PTA(AMX_COMPLEX) # 120| DEF_PTA(AVXVNNIINT16) # 121| DEF_PTA(SM3) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:120: error[shiftTooManyBits]: Shifting 64-bit value by 100 bits is undefined behaviour # 118| DEF_PTA(RAOINT) # 119| DEF_PTA(AMX_COMPLEX) # 120|-> DEF_PTA(AVXVNNIINT16) # 121| DEF_PTA(SM3) # 122| DEF_PTA(SHA512) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:121: error[shiftTooManyBits]: Shifting 64-bit value by 101 bits is undefined behaviour # 119| DEF_PTA(AMX_COMPLEX) # 120| DEF_PTA(AVXVNNIINT16) # 121|-> DEF_PTA(SM3) # 122| DEF_PTA(SHA512) # 123| DEF_PTA(SM4) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:122: error[shiftTooManyBits]: Shifting 64-bit value by 102 bits is undefined behaviour # 120| DEF_PTA(AVXVNNIINT16) # 121| DEF_PTA(SM3) # 122|-> DEF_PTA(SHA512) # 123| DEF_PTA(SM4) # 124| DEF_PTA(APX_F) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:123: error[shiftTooManyBits]: Shifting 64-bit value by 103 bits is undefined behaviour # 121| DEF_PTA(SM3) # 122| DEF_PTA(SHA512) # 123|-> DEF_PTA(SM4) # 124| DEF_PTA(APX_F) # 125| DEF_PTA(USER_MSR) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:124: error[shiftTooManyBits]: Shifting 64-bit value by 104 bits is undefined behaviour # 122| DEF_PTA(SHA512) # 123| DEF_PTA(SM4) # 124|-> DEF_PTA(APX_F) # 125| DEF_PTA(USER_MSR) # 126| DEF_PTA(EVEX512) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:125: error[shiftTooManyBits]: Shifting 64-bit value by 105 bits is undefined behaviour # 123| DEF_PTA(SM4) # 124| DEF_PTA(APX_F) # 125|-> DEF_PTA(USER_MSR) # 126| DEF_PTA(EVEX512) # 127| DEF_PTA(AVX10_1_256) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:126: error[shiftTooManyBits]: Shifting 64-bit value by 106 bits is undefined behaviour # 124| DEF_PTA(APX_F) # 125| DEF_PTA(USER_MSR) # 126|-> DEF_PTA(EVEX512) # 127| DEF_PTA(AVX10_1_256) # 128| DEF_PTA(AVX10_1_512) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:127: error[shiftTooManyBits]: Shifting 64-bit value by 107 bits is undefined behaviour # 125| DEF_PTA(USER_MSR) # 126| DEF_PTA(EVEX512) # 127|-> DEF_PTA(AVX10_1_256) # 128| DEF_PTA(AVX10_1_512) Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/config/i386/i386-isa.def:128: error[shiftTooManyBits]: Shifting 64-bit value by 108 bits is undefined behaviour # 126| DEF_PTA(EVEX512) # 127| DEF_PTA(AVX10_1_256) # 128|-> DEF_PTA(AVX10_1_512) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/predicates.md:1889:24: warning[core.BitwiseShift]: Right operand is negative in left shift # 1887| { 0 2 4 6 8 10 12 14 * * * * * * * * }. */ # 1888| for (int i = 0; i != nelt / 2; i++) # 1889|-> if ((perm[i] & ((1 << id) - 1)) != i * 2) # 1890| return false; # 1891| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:4920:3: warning[deadcode.DeadStores]: Value stored to 'suffix' is never read # 4918| const char *suffix; # 4919| # 4920|-> suffix = "<ssemodesuffix>"; # 4921| ops = ""; # 4922| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:4921:3: warning[deadcode.DeadStores]: Value stored to 'ops' is never read # 4919| # 4920| suffix = "<ssemodesuffix>"; # 4921|-> ops = ""; # 4922| # 4923| /* Since there are no vandnp[sd] without AVX512DQ nor vandnph, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:5041:3: warning[deadcode.DeadStores]: Value stored to 'suffix' is never read # 5039| const char *suffix; # 5040| # 5041|-> suffix = "<ssemodesuffix>"; # 5042| ops = ""; # 5043| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:5042:3: warning[deadcode.DeadStores]: Value stored to 'ops' is never read # 5040| # 5041| suffix = "<ssemodesuffix>"; # 5042|-> ops = ""; # 5043| # 5044| /* Since there are no v<logic>p[sd] without AVX512DQ nor v<logic>ph, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:7160:7: warning[deadcode.DeadStores]: Value stored to 'tem' during its initialization is never read # 7158| "TARGET_AVX512FP16" # 7159| { # 7160|-> rtx tem = operands[1]; # 7161| rtx (*gen) (rtx, rtx); # 7162| if (<MODE>mode != V8HFmode) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:7181:7: warning[deadcode.DeadStores]: Value stored to 'tem' during its initialization is never read # 7179| "TARGET_AVX512FP16" # 7180| { # 7181|-> rtx tem = operands[1]; # 7182| rtx (*gen) (rtx, rtx); # 7183| if (<MODE>mode != V8HFmode) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:19139:15: warning[deadcode.DeadStores]: Value stored to 'align_templ' during its initialization is never read #19137| bool egpr_used = (TARGET_APX_EGPR #19138| && x86_extended_rex2reg_mentioned_p (operands[2])); #19139|-> const char *align_templ = egpr_used ? "vmovaps\t{%2, %x0|%x0, %2}" #19140| : "vmovdqa\t{%2, %x0|%x0, %2}"; #19141| const char *unalign_templ = egpr_used ? "vmovups\t{%2, %x0|%x0, %2}" Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:19141:15: warning[deadcode.DeadStores]: Value stored to 'unalign_templ' during its initialization is never read #19139| const char *align_templ = egpr_used ? "vmovaps\t{%2, %x0|%x0, %2}" #19140| : "vmovdqa\t{%2, %x0|%x0, %2}"; #19141|-> const char *unalign_templ = egpr_used ? "vmovups\t{%2, %x0|%x0, %2}" #19142| : "vmovdqu\t{%2, %x0|%x0, %2}"; #19143| switch (<MODE>mode) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/i386/sse.md:23645:11: warning[deadcode.DeadStores]: Value stored to 'op1' during its initialization is never read #23643| if (!MEM_P (operands[1])) #23644| { #23645|-> rtx op1 = force_reg (V4QImode, operands[1]); #23646| op1 = lowpart_subreg (V16QImode, operands[1], V4QImode); #23647| emit_insn (gen_avx2_<code>v4qiv4di2 (operands[0], op1)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:188:12: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 186| unsigned num = 1, i; # 187| # 188|-> curval = strchr (str, ':'); # 189| while (curval) # 190| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:359:26: warning[core.NullDereference]: Array access (from variable 'version2') results in a null pointer dereference # 357| fprintf (out, "static const char ptx_code_%u[] =\n", obj_count++); # 358| fprintf (out, "\t\".version "); # 359|-> for (size_t i = 0; version2[i] != '\0' && version2[i] != '\n'; i++) # 360| fputc (version2[i], out); # 361| fprintf (out, "\"\n\t\".target sm_"); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:437:26: warning[core.NullDereference]: Array access (from variable 'version') results in a null pointer dereference # 435| fprintf (out, "static const char ptx_code_%u[] =\n", obj_count++); # 436| fprintf (out, "\t\".version "); # 437|-> for (size_t i = 0; version[i] != '\0' && version[i] != '\n'; i++) # 438| fputc (version[i], out); # 439| fprintf (out, "\"\n\t\".target sm_"); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:440:26: warning[core.NullDereference]: Array access (from variable 'sm_ver') results in a null pointer dereference # 438| fputc (version[i], out); # 439| fprintf (out, "\"\n\t\".target sm_"); # 440|-> for (size_t i = 0; sm_ver[i] != '\0' && sm_ver[i] != '\n'; i++) # 441| fputc (sm_ver[i], out); # 442| fprintf (out, "\"\n\t\".file 2 \\\"<dummy>\\\"\"\n"); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc: scope_hint: In function ‘void compile_native(const char*, const char*, const char*, bool, bool)’ gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:591:40: warning[-Wformat-diag]: unquoted identifier or keyword ‘COLLECT_GCC_OPTIONS’ in format # 591 | "environment variable COLLECT_GCC_OPTIONS must be set"); # | ^~~~~~~~~~~~~~~~~~~ # 589| if (!collect_gcc_options) # 590| fatal_error (input_location, # 591|-> "environment variable COLLECT_GCC_OPTIONS must be set"); # 592| # 593| struct obstack argv_obstack; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:636:9: warning[deadcode.DeadStores]: Value stored to 'in' during its initialization is never read # 634| main (int argc, char **argv) # 635| { # 636|-> FILE *in = stdin; # 637| FILE *out = stdout; # 638| const char *outname = 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:637:9: warning[deadcode.DeadStores]: Value stored to 'out' during its initialization is never read # 635| { # 636| FILE *in = stdin; # 637|-> FILE *out = stdout; # 638| const char *outname = 0; # 639| Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc: scope_hint: In function ‘int main(int, char**)’ gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:650:35: warning[-Wformat-diag]: unquoted identifier or keyword ‘COLLECT_GCC’ in format # 650 | fatal_error (input_location, "COLLECT_GCC must be set."); # | ^~~~~~~~~~~ # 648| char *collect_gcc = getenv ("COLLECT_GCC"); # 649| if (collect_gcc == NULL) # 650|-> fatal_error (input_location, "COLLECT_GCC must be set."); # 651| const char *gcc_path = dirname (ASTRDUP (collect_gcc)); # 652| const char *gcc_exec = basename (ASTRDUP (collect_gcc)); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:721:26: warning[-Wformat-diag]: spurious trailing punctuation sequence ‘=’ in format # 721 | "unrecognizable argument of option " STR); # | ^ gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:712:27: note: format string is defined here # 712 | #define STR "-foffload-abi=" # | ^ # 719| else # 720| fatal_error (input_location, # 721|-> "unrecognizable argument of option " STR); # 722| } # 723| #undef STR Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:721:26: warning[-Wformat-diag]: unquoted option name ‘-foffload-abi’ in format # 721 | "unrecognizable argument of option " STR); # | ^ gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:712:14: note: format string is defined here # 712 | #define STR "-foffload-abi=" # | ^~~~~~~~~~~~~ # 719| else # 720| fatal_error (input_location, # 721|-> "unrecognizable argument of option " STR); # 722| } # 723| #undef STR Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:843:51: warning[-Wformat-diag]: unquoted identifier or keyword ‘omp_requires’ in format # 843 | fatal_error (input_location, "cannot open omp_requires file %qs", # | ^~~~~~~~~~~~ # 841| in = fopen (omp_requires_file, "rb"); # 842| if (!in) # 843|-> fatal_error (input_location, "cannot open omp_requires file %qs", # 844| omp_requires_file); # 845| uint32_t omp_requires; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/mkoffload.cc:847:51: warning[-Wformat-diag]: unquoted identifier or keyword ‘omp_requires’ in format # 847 | fatal_error (input_location, "cannot read omp_requires file %qs", # | ^~~~~~~~~~~~ # 845| uint32_t omp_requires; # 846| if (fread (&omp_requires, sizeof (omp_requires), 1, in) != 1) # 847|-> fatal_error (input_location, "cannot read omp_requires file %qs", # 848| omp_requires_file); # 849| fclose (in); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/nvptx/nvptx.cc: scope_hint: In function ‘void handle_ptx_version_option()’ gcc-14.0.1-20240411/gcc/config/nvptx/nvptx.cc:325:12: warning[-Wformat-diag]: unquoted identifier or keyword ‘sm_’ in format # 325 | error ("PTX version (%<-mptx%>) needs to be at least %s to support selected" # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 326 | " %<-misa%> (sm_%s)", ptx_version_to_string (first), # | ~~~~~~~~~~~~~~~~~~~~ # 323| # 324| if (ptx_version_option < first) # 325|-> error ("PTX version (%<-mptx%>) needs to be at least %s to support selected" # 326| " %<-misa%> (sm_%s)", ptx_version_to_string (first), # 327| sm_version_to_string ((enum ptx_isa)ptx_isa_option)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/coroutine-passes.cc:431:7: warning[deadcode.DeadStores]: Value stored to 'changed' is never read # 429| HOST_WIDE_INT idx = TREE_INT_CST_LOW (gimple_call_arg (stmt, 0)); # 430| tree *seen = destinations.get (idx); # 431|-> changed = true; # 432| # 433| if (dump_file) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/constexpr.cc: scope_hint: In function ‘bool cxx_eval_assert(const constexpr_ctx*, tree, const char*, location_t, bool, bool*, bool*)’ gcc-14.0.1-20240411/gcc/cp/constexpr.cc:2125:20: warning[-Wformat-security]: format not a string literal and no format arguments # 2125 | error_at (cloc, msg); # | ~~~~~~~~~^~~~~~~~~~~ # 2123| /* Report the error. */ # 2124| auto_diagnostic_group d; # 2125|-> error_at (cloc, msg); # 2126| diagnose_failing_condition (bad, cloc, true, ctx); # 2127| return bad; Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/cp/contracts.cc:565: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 563| return role->audit_semantic; # 564| else if (level == CONTRACT_AXIOM) # 565|-> return role->axiom_semantic; # 566| } # 567| gcc_assert (false); Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/coroutines.cc: scope_hint: In function ‘bool coro_promise_type_found_p(tree, location_t)’ gcc-14.0.1-20240411/gcc/cp/coroutines.cc:523:18: warning[-Wformat-security]: format not a string literal and no format arguments # 523 | inform (DECL_SOURCE_LOCATION (has_ret_val), message); # | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 521| message = "%<return_value%> first declared here"; # 522| } # 523|-> inform (DECL_SOURCE_LOCATION (has_ret_val), message); # 524| coro_info->coro_co_return_error_emitted = true; # 525| return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cp-gimplify.cc:1098:13: warning[core.NullDereference]: Array access (via field 'operands') results in a null pointer dereference # 1096| { # 1097| iloc_sentinel ils = EXPR_LOCATION (*stmt_p); # 1098|-> tree to = TREE_OPERAND (*stmt_p, 0); # 1099| tree from = TREE_OPERAND (*stmt_p, 1); # 1100| if (SIMPLE_TARGET_EXPR_P (from) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cp-gimplify.cc:1114:15: warning[core.NullDereference]: Array access (via field 'operands') results in a null pointer dereference # 1112| { # 1113| iloc_sentinel ils = EXPR_LOCATION (*stmt_p); # 1114|-> tree slot = TARGET_EXPR_SLOT (*stmt_p); # 1115| cp_genericize_init (&TARGET_EXPR_INITIAL (*stmt_p), # 1116| TARGET_EXPR_INITIAL (*stmt_p), slot); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cp-gimplify.cc:3673:15: warning[core.NullDereference]: Dereference of null pointer # 3671| else # 3672| { # 3673|-> tree arg = TREE_VALUE (args); # 3674| if (!type_dependent_expression_p (arg)) # 3675| arg = contextual_conv_bool (arg, tf_warning_or_error); Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/cvt.cc: scope_hint: In function ‘tree_node* ocp_convert(tree, tree, int, int, tsubst_flags_t)’ gcc-14.0.1-20240411/gcc/cp/cvt.cc:727:15: warning[-Wformat-security]: format not a string literal and no format arguments # 727 | error (invalid_conv_diag); # | ~~~~~~^~~~~~~~~~~~~~~~~~~ # 725| { # 726| if (complain & tf_error) # 727|-> error (invalid_conv_diag); # 728| return error_mark_node; # 729| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cxx-pretty-print.cc:129:25: warning[core.NullDereference]: Dereference of null pointer # 127| pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t) # 128| { # 129|-> enum tree_code code = TREE_CODE (t); # 130| switch (code) # 131| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cxx-pretty-print.cc:212:42: warning[core.NullDereference]: Access to field 'args' results in a dereference of a null pointer # 210| pp_cxx_unqualified_id (pp, TYPE_IDENTIFIER (t)); # 211| pp_cxx_begin_template_argument_list (pp); # 212|-> pp_cxx_template_argument_list (pp, TYPE_TI_ARGS (t)); # 213| pp_cxx_end_template_argument_list (pp); # 214| break; Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/decl.cc: scope_hint: In function ‘bool check_previous_goto_1(tree, cp_binding_level*, tree, bool, const location_t*, vec<tree_node*, va_gc>*)’ gcc-14.0.1-20240411/gcc/cp/decl.cc:3815:20: warning[-Wformat-security]: format not a string literal and no format arguments # 3815 | inform (loc, inf); # | ~~~~~~~^~~~~~~~~~ # 3813| identified = 2; # 3814| if (complained) # 3815|-> inform (loc, inf); # 3816| } # 3817| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:515:28: warning[core.NullDereference]: Dereference of null pointer # 513| dump_scope (pp, CP_DECL_CONTEXT (decl), flags); # 514| pp_cxx_tree_identifier (pp, DECL_NAME (decl)); # 515|-> dump_template_parms (pp, DECL_TEMPLATE_INFO (decl), # 516| /*primary=*/false, # 517| flags & ~TFF_TEMPLATE_HEADER); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:554:4: warning[core.NullDereference]: Dereference of null pointer # 552| if (! (flags & TFF_UNQUALIFIED_NAME)) # 553| dump_scope (pp, CP_DECL_CONTEXT (decl), flags); # 554|-> pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t)); # 555| return; # 556| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:633:2: warning[core.NullDereference]: Dereference of null pointer # 631| tree args = TYPE_TI_ARGS (t); # 632| pp_cxx_cv_qualifier_seq (pp, t); # 633|-> pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (t)); # 634| pp_cxx_begin_template_argument_list (pp); # 635| dump_template_argument_list (pp, args, flags); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:645:4: warning[core.NullDereference]: Dereference of null pointer # 643| { # 644| tree tmpl = TREE_TYPE (CLASS_PLACEHOLDER_TEMPLATE (t)); # 645|-> pp_cxx_tree_identifier (pp, TYPE_IDENTIFIER (tmpl)); # 646| pp_string (pp, "<...auto...>"); # 647| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:831:15: warning[core.NullDereference]: Access to field 'tmpl' results in a dereference of a null pointer # 829| /* Because the template names are mangled, we have to locate # 830| the most general template, and use that name. */ # 831|-> tree tpl = TYPE_TI_TEMPLATE (t); # 832| # 833| while (DECL_TEMPLATE_INFO (tpl)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:1171:10: warning[core.NullDereference]: Dereference of null pointer # 1169| if ((flags & TFF_DECL_SPECIFIERS) # 1170| && DECL_TEMPLATE_PARM_P (t) # 1171|-> && TEMPLATE_PARM_PARAMETER_PACK (DECL_INITIAL (t))) # 1172| pp_string (pp, "..."); # 1173| if (DECL_NAME (t)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:1346:4: warning[deadcode.DeadStores]: Value stored to 'flags' is never read # 1344| if (! (flags & TFF_UNQUALIFIED_NAME)) # 1345| dump_scope (pp, CP_DECL_CONTEXT (t), flags); # 1346|-> flags &= ~TFF_UNQUALIFIED_NAME; # 1347| if (DECL_NAME (t) == NULL_TREE) # 1348| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/error.cc:1498:3: warning[deadcode.DeadStores]: Value stored to 'name' is never read # 1496| && PACK_EXPANSION_P (TREE_TYPE (name))) # 1497| { # 1498|-> name = make_conv_op_name (PACK_EXPANSION_PATTERN # 1499| (TREE_TYPE (name))); # 1500| variadic = true; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/cp/except.cc:154: warning[nullPointer]: Possible null pointer dereference: args # 152| tree arg_list = void_list_node; # 153| for (unsigned ix = nargs; ix--;) # 154|-> arg_list = tree_cons (NULL_TREE, args[ix], arg_list); # 155| tree fntype = build_function_type (rtype, arg_list); # 156| tree res = push_library_fn (ident, fntype, except, ecf); Error: CPPCHECK_WARNING (CWE-571): gcc-14.0.1-20240411/gcc/cp/except.cc:619: error[pointerArithBool]: Converting pointer arithmetic result to bool. The bool is always true unless there is undefined behaviour. # 617| if (processing_template_decl) # 618| { # 619|-> if (cfun) # 620| current_function_returns_abnormally = 1; # 621| exp = build_min (THROW_EXPR, void_type_node, exp); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/friend.cc:664:32: warning[core.NullDereference]: Dereference of null pointer # 662| return error_mark_node; # 663| # 664|-> if (!class_template_depth && DECL_IMPLICIT_INSTANTIATION (decl) # 665| && TREE_CODE (DECL_TI_TEMPLATE (decl)) != TEMPLATE_DECL) # 666| /* "[if no non-template match is found,] each remaining function template Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/g++spec.cc:232:4: warning[deadcode.DeadStores]: Value stored to 'shared_libgcc' is never read # 230| # 231| case OPT_static_libgcc: # 232|-> shared_libgcc = 0; # 233| break; # 234| Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/cp/logic.cc:450: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 448| /* Neither LHS nor RHS is a disjunction. */ # 449| return std::make_pair (0, false); # 450|-> } # 451| } # 452| gcc_unreachable (); Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/cp/logic.cc:556: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement # 554| /* Neither LHS nor RHS is a disjunction. */ # 555| return std::make_pair (2, false); # 556|-> } # 557| } # 558| gcc_unreachable (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/mangle.cc:1669:3: warning[core.NullDereference]: Dereference of null pointer # 1667| MANGLE_TRACE_TREE ("source-name", identifier); # 1668| # 1669|-> write_unsigned_number (IDENTIFIER_LENGTH (identifier)); # 1670| write_identifier (IDENTIFIER_POINTER (identifier)); # 1671| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/mangle.cc:2083:7: warning[deadcode.DeadStores]: Value stored to 'chunk_digits' is never read # 2081| representable. */ # 2082| chunk = 1000000000; # 2083|-> chunk_digits = 9; # 2084| # 2085| if (sizeof (HOST_WIDE_INT) >= 8) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/mangle.cc:3202:7: warning[core.NullDereference]: Dereference of null pointer # 3200| length = TREE_VEC_LENGTH (args); # 3201| } # 3202|-> if (TEMPLATE_ARGS_TYPE_CONSTRAINT_P (args)) # 3203| /* Skip the constrained type. */ # 3204| i = 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/optimize.cc:719:7: warning[deadcode.DeadStores]: Value stored to 'first' is never read # 717| else # 718| expand_or_defer_fn (clone); # 719|-> first = false; # 720| } # 721| pop_from_top_level (); Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/pt.cc: scope_hint: In function ‘tree_node* tsubst_expr(tree, tree, tsubst_flags_t, tree)’ gcc-14.0.1-20240411/gcc/cp/pt.cc:20029:17: warning[-Wformat-security]: format not a string literal and no format arguments #20029 | error (error_msg); # | ~~~~~~^~~~~~~~~~~ #20027| input_location); #20028| if (error_msg) #20029|-> error (error_msg); #20030| if (identifier_p (decl)) #20031| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/ptree.cc:124:7: warning[deadcode.DeadStores]: Value stored to 'need_indent' is never read # 122| fprintf (file, " pending-inline-info %p", # 123| (void *) DECL_PENDING_INLINE_INFO (node)); # 124|-> need_indent = false; # 125| } # 126| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/ptree.cc:323:5: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 321| len += sprintf (&pfx[len], "(+%u)", # 322| cluster->indices[jx].span); # 323|-> len += sprintf (&pfx[len], " cluster:%u/%u", ix, jx); # 324| binding_slot &slot = cluster->slots[jx]; # 325| if (slot.is_lazy ()) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/gcc/cp/search.cc:1946: error[returnDanglingLifetime]: Returning pointer to local variable 'lfd' that will be invalid when returning. # 1944| access to the field. */ # 1945| locate_field_data lfd (field_decl, const_p); # 1946|-> return dfs_walk_once_accessible (basetype_path, /*friends=*/true, # 1947| dfs_locate_field_accessor_pre, # 1948| NULL, &lfd); Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/typeck.cc: scope_hint: In function ‘tree_node* cp_build_binary_op(const op_location_t&, tree_code, tree, tree, tsubst_flags_t)’ gcc-14.0.1-20240411/gcc/cp/typeck.cc:5318:19: warning[-Wformat-security]: format not a string literal and no format arguments # 5318 | error (invalid_op_diag); # | ~~~~~~^~~~~~~~~~~~~~~~~ # 5316| } # 5317| else # 5318|-> error (invalid_op_diag); # 5319| } # 5320| return error_mark_node; Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/cp/typeck.cc: scope_hint: In function ‘tree_node* cp_build_unary_op(tree_code, tree, bool, tsubst_flags_t)’ gcc-14.0.1-20240411/gcc/cp/typeck.cc:7420:15: warning[-Wformat-security]: format not a string literal and no format arguments # 7420 | error (invalid_op_diag); # | ~~~~~~^~~~~~~~~~~~~~~~~ # 7418| { # 7419| if (complain & tf_error) # 7420|-> error (invalid_op_diag); # 7421| return error_mark_node; # 7422| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/typeck2.cc:352:16: warning[core.NullDereference]: Array access (via field 'operands') results in a null pointer dereference # 350| bad_member: # 351| { # 352|-> tree member = TREE_OPERAND (value, 1); # 353| if (is_overloaded_fn (member) && !flag_ms_extensions) # 354| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/typeck2.cc:1532:13: warning[core.NullDereference]: Dereference of null pointer # 1530| if (init == error_mark_node) # 1531| return PICFLAG_ERRONEOUS; # 1532|-> else if (!TREE_CONSTANT (init)) # 1533| { # 1534| if (TREE_SIDE_EFFECTS (init)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/vtable-class-hierarchy.cc:453:10: warning[core.NullDereference]: Dereference of null pointer # 451| # 452| if (TREE_CODE (vptr_address) == ADDR_EXPR # 453|-> && TREE_CODE (TREE_OPERAND (vptr_address, 0)) == MEM_REF) # 454| vptr_address = TREE_OPERAND (vptr_address, 0); # 455| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/vtable-class-hierarchy.cc:541:23: warning[core.NullDereference]: Array access (via field 'operands') results in a null pointer dereference # 539| argument of value.*/ # 540| # 541|-> if (TREE_OPERAND (value, 0)) # 542| val_vtbl_decl = TREE_OPERAND (value, 0); # 543| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/vtable-class-hierarchy.cc:544:27: warning[core.NullDereference]: Dereference of null pointer # 542| val_vtbl_decl = TREE_OPERAND (value, 0); # 543| # 544|-> while (!VAR_P (val_vtbl_decl) # 545| && TREE_OPERAND (val_vtbl_decl, 0)) # 546| val_vtbl_decl = TREE_OPERAND (val_vtbl_decl, 0); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cprop.cc:206:28: warning[core.NullDereference]: Access to field 'next_same_hash' results in a dereference of a null pointer (loaded from variable 'last_expr') # 204| else # 205| /* Add EXPR to end of this hash chain. */ # 206|-> last_expr->next_same_hash = cur_expr; # 207| # 208| /* Set the fields of the expr element. Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cprop.cc:297:24: warning[deadcode.DeadStores]: Although the value stored to 'set' is used in the enclosing expression, the value is never actually read from 'set' # 295| && !REG_P (src) # 296| && cprop_constant_p (XEXP (note, 0))) # 297|-> src = XEXP (note, 0), set = gen_rtx_SET (dest, src); # 298| # 299| /* Record sets for constant/copy propagation. */ Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/d/d-diagnostic.cc:190: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 188| { # 189| va_list argp; # 190|-> va_copy (argp, ap); # 191| # 192| if (loc.filename () || !verbatim) Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/d/d-diagnostic.cc:198: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 196| char *xformat = expand_d_format (format); # 197| # 198|-> diagnostic_set_info_translated (&diagnostic, xformat, &argp, # 199| &rich_loc, kind); # 200| if (opt != 0) Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/d/d-diagnostic.cc:208: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 206| { # 207| /* Write verbatim messages with no location direct to stream. */ # 208|-> text_info text (expand_d_format (format), &argp, errno, nullptr); # 209| # 210| pp_format_verbatim (global_dc->printer, &text); Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/d/d-diagnostic.cc:214: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 212| } # 213| # 214|-> va_end (argp); # 215| } # 216| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/d/d-longdouble.cc:117: error[uninitvar]: Uninitialized variable: x # 115| { # 116| longdouble x; # 117|-> real_arithmetic (&x.rv (), PLUS_EXPR, &this->rv (), &r.rv ()); # 118| return x.normalize (); # 119| } Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/d/d-longdouble.cc:125: error[uninitvar]: Uninitialized variable: x # 123| { # 124| longdouble x; # 125|-> real_arithmetic (&x.rv (), MINUS_EXPR, &this->rv (), &r.rv ()); # 126| return x.normalize (); # 127| } Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/d/d-longdouble.cc:133: error[uninitvar]: Uninitialized variable: x # 131| { # 132| longdouble x; # 133|-> real_arithmetic (&x.rv (), MULT_EXPR, &this->rv (), &r.rv ()); # 134| return x.normalize (); # 135| } Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/d/d-longdouble.cc:141: error[uninitvar]: Uninitialized variable: x # 139| { # 140| longdouble x; # 141|-> real_arithmetic (&x.rv (), RDIV_EXPR, &this->rv (), &r.rv ()); # 142| return x.normalize (); # 143| } Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/d/d-longdouble.cc:176: error[uninitvar]: Uninitialized variable: x # 174| { # 175| longdouble x; # 176|-> real_arithmetic (&x.rv (), NEGATE_EXPR, &this->rv (), NULL); # 177| return x.normalize (); # 178| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/decl.cc:876:3: warning[core.NonNullParamChecker]: Forming reference to null pointer # 874| { # 875| /* Rewrite: `decl = exp' => TARGET_EXPR(decl, exp, dtor). */ # 876|-> vec_safe_push (d_function_chain->vars_in_scope, decl); # 877| # 878| /* Force a TARGET_EXPR to add the corresponding cleanup. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/decl.cc:1014:38: warning[core.NullDereference]: Access to field 'static_chain' results in a dereference of a null pointer # 1012| by going through parent link of nested classes. */ # 1013| if (d->vthis) # 1014|-> d_function_chain->static_chain = get_symbol_decl (d->vthis); # 1015| # 1016| if (d->isThis ()) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/decl.cc:1030:34: warning[core.NullDereference]: Access to field 'static_chain' results in a dereference of a null pointer # 1028| if (ad == NULL) # 1029| { # 1030|-> d_function_chain->static_chain = this_tree; # 1031| break; # 1032| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/decl.cc:1421:11: warning[core.CallAndMessage]: Called C++ object pointer is null # 1419| tracking which context to follow when encountering a non-local symbol, # 1420| and so are a not planned to be supported. */ # 1421|-> if (fd->needThis () && !fd->isMember2 ()) # 1422| { # 1423| fatal_error (make_location_t (fd->loc), Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/decl.cc:2139:34: warning[core.NullDereference]: Access to field 'stmt_list' results in a dereference of a null pointer # 2137| BLOCK_VARS (block), body, block); # 2138| # 2139|-> gcc_assert (vec_safe_is_empty (d_function_chain->stmt_list)); # 2140| # 2141| /* Back-end expects a statement list to come from somewhere, however Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:1721:27: warning[core.NullDereference]: Access to field 'function' results in a dereference of a null pointer # 1719| { # 1720| /* Maybe re-evaluate symbol storage treating `fd' as public. */ # 1721|-> if (call_by_alias_p (d_function_chain->function, fd)) # 1722| TREE_PUBLIC (callee) = 1; # 1723| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:1791:47: warning[core.NullDereference]: Access to field 'module' results in a dereference of a null pointer # 1789| while (!owner->isTemplateInstance () && owner->toParent ()) # 1790| owner = owner->toParent (); # 1791|-> if (owner->isTemplateInstance () || owner == d_function_chain->module) # 1792| build_decl_tree (e->func); # 1793| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:1904:20: warning[core.NullDereference]: Access to field 'function' results in a dereference of a null pointer # 1902| /* Generate: ((bool) e1 ? (void)0 : _d_assert (...)) # 1903| or: (e1 != null ? e1._invariant() : _d_assert (...)) */ # 1904|-> bool unittest_p = d_function_chain->function->isUnitTestDeclaration (); # 1905| libcall_fn libcall; # 1906| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3042:40: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3040| /* Codegen can be improved by determining if no exceptions can be thrown # 3041| between the ctor and dtor, and eliminating the ctor and dtor. */ # 3042|-> size_t saved_vars = vec_safe_length (d_function_chain->vars_in_scope); # 3043| tree result = build_expr (e); # 3044| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3045:38: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3043| tree result = build_expr (e); # 3044| # 3045|-> if (saved_vars != vec_safe_length (d_function_chain->vars_in_scope)) # 3046| { # 3047| result = fold_build_cleanup_point_expr (TREE_TYPE (result), result); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3048:26: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3046| { # 3047| result = fold_build_cleanup_point_expr (TREE_TYPE (result), result); # 3048|-> vec_safe_truncate (d_function_chain->vars_in_scope, saved_vars); # 3049| } # 3050| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3059:40: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3057| build_return_dtor (Expression *e, Type *type, TypeFunction *tf) # 3058| { # 3059|-> size_t saved_vars = vec_safe_length (d_function_chain->vars_in_scope); # 3060| tree result = build_expr (e); # 3061| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3081:38: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3079| # 3080| /* May nest the return expression inside the try/finally expression. */ # 3081|-> if (saved_vars != vec_safe_length (d_function_chain->vars_in_scope)) # 3082| { # 3083| result = fold_build_cleanup_point_expr (TREE_TYPE (result), result); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/expr.cc:3084:26: warning[core.NullDereference]: Access to field 'vars_in_scope' results in a dereference of a null pointer # 3082| { # 3083| result = fold_build_cleanup_point_expr (TREE_TYPE (result), result); # 3084|-> vec_safe_truncate (d_function_chain->vars_in_scope, saved_vars); # 3085| } # 3086| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/imports.cc:188:5: warning[core.CallAndMessage]: Called C++ object pointer is null # 186| # 187| this->result_ = build_tree_list_vec (tset); # 188|-> tset->truncate (0); # 189| } # 190| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/intrinsics.cc:719:30: warning[core.CallAndMessage]: Called C++ object pointer is null # 717| /* Retrieve from the encoded template instantation. */ # 718| tree callee = get_callee_fndecl (callexp); # 719|-> TemplateInstance *ti = DECL_LANG_FRONTEND (callee)->isInstantiated (); # 720| gcc_assert (ti && ti->tiargs && ti->tiargs->length == 2); # 721| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/intrinsics.cc:1173:40: warning[core.DivideZero]: Division by zero # 1171| constructor_elt elt = { NULL_TREE, build_zero_cst (TREE_TYPE (vec0)) }; # 1172| vec0 = build_constructor_single (ret_type, NULL_TREE, vec0); # 1173|-> for (unsigned i = 1; i < masklen / v0elems; ++i) # 1174| vec_safe_push (CONSTRUCTOR_ELTS (vec0), elt); # 1175| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/intrinsics.cc:1181:40: warning[core.DivideZero]: Division by zero # 1179| constructor_elt elt = { NULL_TREE, build_zero_cst (TREE_TYPE (vec1)) }; # 1180| vec1 = build_constructor_single (ret_type, NULL_TREE, vec1); # 1181|-> for (unsigned i = 1; i < masklen / v1elems; ++i) # 1182| vec_safe_push (CONSTRUCTOR_ELTS (vec1), elt); # 1183| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:132:11: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 130| # 131| /* Pop all the labels declared in the function. */ # 132|-> if (d_function_chain->labels) # 133| { # 134| auto_vec <tree> labels; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:135:4: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 133| { # 134| auto_vec <tree> labels; # 135|-> d_function_chain->labels->traverse <vec <tree> &, # 136| &pop_label> (labels); # 137| d_function_chain->labels->empty (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:137:4: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 135| d_function_chain->labels->traverse <vec <tree> &, # 136| &pop_label> (labels); # 137|-> d_function_chain->labels->empty (); # 138| labels.qsort (cmp_labels); # 139| for (unsigned i = 0; i < labels.length (); ++i) Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/d/toir.cc:153: warning[nullPointer]: Possible null pointer dereference: f # 151| { # 152| language_function *f = d_function_chain; # 153|-> f->labels->traverse <binding_level *, &pop_binding_label> (level); # 154| } # 155| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:170:3: warning[core.NonNullParamChecker]: Forming reference to null pointer # 168| { # 169| tree t = alloc_stmt_list (); # 170|-> vec_safe_push (d_function_chain->stmt_list, t); # 171| d_keep (t); # 172| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:179:12: warning[core.NullDereference]: Access to field 'stmt_list' results in a dereference of a null pointer # 177| pop_stmt_list (void) # 178| { # 179|-> tree t = d_function_chain->stmt_list->pop (); # 180| # 181| /* If the statement list is completely empty, just return it. This is just Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:268:24: warning[core.NullDereference]: Access to field 'stmt_list' results in a dereference of a null pointer # 266| SET_EXPR_LOCATION (t, input_location); # 267| # 268|-> tree stmt_list = d_function_chain->stmt_list->last (); # 269| append_to_statement_list_force (t, &stmt_list); # 270| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:363:26: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 361| gcc_assert (DECL_INITIAL (label) == NULL_TREE); # 362| # 363|-> d_label_entry *ent = d_function_chain->labels->get (s); # 364| gcc_assert (ent != NULL); # 365| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:403:26: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 401| void check_goto (Statement *from, Statement *to) # 402| { # 403|-> d_label_entry *ent = d_function_chain->labels->get (to); # 404| gcc_assert (ent != NULL); # 405| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:470:4: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 468| { # 469| d_function_chain->labels # 470|-> = hash_map <Statement *, d_label_entry>::create_ggc (13); # 471| } # 472| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:489:17: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 487| ent->label = decl; # 488| # 489|-> bool existed = d_function_chain->labels->put (s, *ent); # 490| gcc_assert (!existed); # 491| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:506:23: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 504| if (TREE_CODE (vec) == LABEL_DECL) # 505| { # 506|-> d_label_entry *ent = d_function_chain->labels->get (s); # 507| gcc_assert (ent != NULL); # 508| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/d/toir.cc:576:26: warning[core.NullDereference]: Access to field 'labels' results in a dereference of a null pointer # 574| { # 575| Statement *stmt = s->getRelatedLabeled (); # 576|-> d_label_entry *ent = d_function_chain->labels->get (stmt); # 577| gcc_assert (ent != NULL && ent->bc_label == true); # 578| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/value-prof.cc:31: included_from: Included from here. gcc-14.0.1-20240411/gcc/data-streamer.h:131:19: warning[core.BitwiseShift]: Right operand is negative in left shift # 129| else # 130| { # 131|-> word |= val << pos; # 132| pos += nbits; # 133| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dfp.cc:94:11: warning[core.NullDereference]: Access to field 'cl' results in a dereference of a null pointer (loaded from variable 'r') # 92| set.traps = 0; # 93| # 94|-> switch (r->cl) # 95| { # 96| case rvc_zero: Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dfp.cc:677:11: warning[core.NullDereference]: Access to field 'cl' results in a dereference of a null pointer (loaded from variable 'op1') # 675| # 676| case MIN_EXPR: # 677|-> if (op1->cl == rvc_nan) # 678| *r = *op1; # 679| else if (real_compare (UNLT_EXPR, op0, op1)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dfp.cc:686:11: warning[core.NullDereference]: Access to field 'cl' results in a dereference of a null pointer (loaded from variable 'op1') # 684| # 685| case MAX_EXPR: # 686|-> if (op1->cl == rvc_nan) # 687| *r = *op1; # 688| else if (real_compare (LT_EXPR, op0, op1)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/diagnostic-show-locus.cc:1309:16: warning[core.CallAndMessage]: 6th function call argument is an uninitialized value # 1307| /* Everything is now known to be in the correct source file, # 1308| but it may require further sanitization. */ # 1309|-> layout_range ri (exploc_with_display_col (m_file_cache, # 1310| start, m_policy, # 1311| LOCATION_ASPECT_START), Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/diagnostic-show-locus.cc:1801:7: warning[deadcode.DeadStores]: Value stored to 'c' is never read # 1799| /* Output the character. */ # 1800| m_policy.m_print_cb (m_pp, cp); # 1801|-> c = dw.next_byte (); # 1802| } # 1803| print_newline (); Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/diagnostic.cc: scope_hint: In function ‘void fancy_abort(const char*, int, const char*)’ gcc-14.0.1-20240411/gcc/diagnostic.cc:2333:15: warning[-Wformat-security]: format not a string literal and no format arguments # 2333 | fnotice (stderr, diagnostic_kind_text[DK_ICE]); # | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 2331| { # 2332| /* Print the error message. */ # 2333|-> fnotice (stderr, diagnostic_kind_text[DK_ICE]); # 2334| fnotice (stderr, "in %s, at %s:%d", function, trim_filename (file), line); # 2335| fputc ('\n', stderr); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dominance.cc:650:36: warning[core.NullDereference]: Access to field 'son' results in a dereference of a null pointer (loaded from field 'father') # 648| else # 649| { # 650|-> while (!n->right || n->right == n->father->son) # 651| { # 652| n->dfs_num_out = (*num)++; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dominance.cc:1205:16: warning[deadcode.DeadStores]: Value stored to 'dir_index' during its initialization is never read # 1203| recompute_dominator (enum cdi_direction dir, basic_block bb) # 1204| { # 1205|-> unsigned int dir_index = dom_convert_dir_to_idx (dir); # 1206| basic_block dom_bb = NULL; # 1207| edge e; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dominance.cc:1403:16: warning[deadcode.DeadStores]: Value stored to 'dir_index' during its initialization is never read # 1401| edge_iterator ei; # 1402| int *parent, *son, *brother; # 1403|-> unsigned int dir_index = dom_convert_dir_to_idx (dir); # 1404| # 1405| /* We only support updating dominators. There are some problems with Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/double-int.cc:95: error[ctunullpointer]: Null pointer dereference: hi # 93| { # 94| *low = words[0] + words[1] * BASE; # 95|-> *hi = words[2] + words[3] * BASE; # 96| } # 97| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/double-int.cc:624:7: warning[deadcode.DeadStores]: Value stored to 'words' during its initialization is never read # 622| { # 623| double_int result = double_int_zero; # 624|-> int words = len / UNITS_PER_WORD; # 625| # 626| gcc_assert (len * BITS_PER_UNIT <= HOST_BITS_PER_DOUBLE_INT); Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:684: error[uninitvar]: Uninitialized variable: mask.max_value # 682| } # 683| # 684|-> return mask; # 685| } # 686| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:735: error[uninitvar]: Uninitialized variable: r.max_value # 733| r.high = cst.high & mask.high; # 734| # 735|-> return r; # 736| } # 737| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/double-int.cc:755:14: warning[core.BitwiseShift]: Right shift by '4294967295' overflows the capacity of 'unsigned long' # 753| snum = (unsigned HOST_WIDE_INT) cst.high; # 754| } # 755|-> if (((snum >> (prec - 1)) & 1) == 1) # 756| { # 757| r.low = cst.low | ~mask.low; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:766: error[uninitvar]: Uninitialized variable: r.max_value # 764| } # 765| # 766|-> return r; # 767| } # 768| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:803: error[uninitvar]: Uninitialized variable: ret.max_value # 801| double_int ret; # 802| mul_double (a.low, a.high, b.low, b.high, &ret.low, &ret.high); # 803|-> return ret; # 804| } # 805| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:826: error[uninitvar]: Uninitialized variable: ret.max_value # 824| &ret.low, &ret.high, # 825| &tem.low, &tem.high, unsigned_p); # 826|-> return ret; # 827| } # 828| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:839: error[uninitvar]: Uninitialized variable: lower.max_value # 837| &higher->low, &higher->high, # 838| unsigned_p); # 839|-> return lower; # 840| } # 841| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:850: error[uninitvar]: Uninitialized variable: ret.max_value # 848| double_int ret; # 849| add_double (a.low, a.high, b.low, b.high, &ret.low, &ret.high); # 850|-> return ret; # 851| } # 852| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:873: error[uninitvar]: Uninitialized variable: ret.max_value # 871| *overflow = add_double_with_sign (a.low, a.high, b.low, b.high, # 872| &ret.low, &ret.high, unsigned_p); # 873|-> return ret; # 874| } # 875| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:885: error[uninitvar]: Uninitialized variable: ret.max_value # 883| neg_double (b.low, b.high, &b.low, &b.high); # 884| add_double (a.low, a.high, b.low, b.high, &ret.low, &ret.high); # 885|-> return ret; # 886| } # 887| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:909: error[uninitvar]: Uninitialized variable: ret.max_value # 907| add_double (low, high, ret.low, ret.high, &ret.low, &ret.high); # 908| *overflow = OVERFLOW_SUM_SIGN (ret.high, b.high, high); # 909|-> return ret; # 910| } # 911| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:920: error[uninitvar]: Uninitialized variable: ret.max_value # 918| double_int ret; # 919| neg_double (a.low, a.high, &ret.low, &ret.high); # 920|-> return ret; # 921| } # 922| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:928: error[uninitvar]: Uninitialized variable: ret.max_value # 926| double_int ret; # 927| *overflow = neg_double (low, high, &ret.low, &ret.high); # 928|-> return ret; # 929| } # 930| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:946: error[uninitvar]: Uninitialized variable: ret.max_value # 944| b.low, b.high, &ret.low, &ret.high, # 945| &mod->low, &mod->high); # 946|-> return ret; # 947| } # 948| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:959: error[uninitvar]: Uninitialized variable: ret.max_value # 957| b.low, b.high, &ret.low, &ret.high, # 958| &mod->low, &mod->high); # 959|-> return ret; # 960| } # 961| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1109: error[uninitvar]: Uninitialized variable: ret.max_value # 1107| } # 1108| # 1109|-> return ret; # 1110| } # 1111| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1142: error[uninitvar]: Uninitialized variable: ret.max_value # 1140| } # 1141| # 1142|-> return ret; # 1143| } # 1144| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1157: error[uninitvar]: Uninitialized variable: ret.max_value # 1155| else # 1156| rshift_double (low, high, absu_hwi (count), prec, &ret.low, &ret.high, arith); # 1157|-> return ret; # 1158| } # 1159| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1172: error[uninitvar]: Uninitialized variable: ret.max_value # 1170| else # 1171| lshift_double (low, high, absu_hwi (count), prec, &ret.low, &ret.high); # 1172|-> return ret; # 1173| } # 1174| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1186: error[uninitvar]: Uninitialized variable: r.max_value # 1184| else # 1185| rshift_double (low, high, absu_hwi (count), prec, &r.low, &r.high, true); # 1186|-> return r; # 1187| } # 1188| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1200: error[uninitvar]: Uninitialized variable: r.max_value # 1198| else # 1199| lshift_double (low, high, absu_hwi (count), prec, &r.low, &r.high); # 1200|-> return r; # 1201| } # 1202| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1214: error[uninitvar]: Uninitialized variable: r.max_value # 1212| else # 1213| rshift_double (low, high, absu_hwi (count), prec, &r.low, &r.high, false); # 1214|-> return r; # 1215| } # 1216| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1228: error[uninitvar]: Uninitialized variable: r.max_value # 1226| else # 1227| lshift_double (low, high, absu_hwi (count), prec, &r.low, &r.high); # 1228|-> return r; # 1229| } # 1230| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.cc:1566: error[uninitvar]: Uninitialized variable: res.max_value # 1564| res.high = (HOST_WIDE_INT) vp[1]; # 1565| # 1566|-> res = res.ext (TYPE_PRECISION (type), TYPE_UNSIGNED (type)); # 1567| if (mpz_sgn (val) < 0) # 1568| res = -res; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:213: error[uninitvar]: Uninitialized variable: r.max_value # 211| r.low = (unsigned HOST_WIDE_INT) cst; # 212| r.high = cst < 0 ? -1 : 0; # 213|-> return r; # 214| } # 215| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:236: error[uninitvar]: Uninitialized variable: r.max_value # 234| r.low = cst; # 235| r.high = 0; # 236|-> return r; # 237| } # 238| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:245: error[uninitvar]: Uninitialized variable: r.max_value # 243| r.low = low; # 244| r.high = high; # 245|-> return r; # 246| } # 247| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:319: error[uninitvar]: Uninitialized variable: result.max_value # 317| result.low = ~low; # 318| result.high = ~high; # 319|-> return result; # 320| } # 321| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:330: error[uninitvar]: Uninitialized variable: result.max_value # 328| result.low = low | b.low; # 329| result.high = high | b.high; # 330|-> return result; # 331| } # 332| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:341: error[uninitvar]: Uninitialized variable: result.max_value # 339| result.low = low & b.low; # 340| result.high = high & b.high; # 341|-> return result; # 342| } # 343| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:352: error[uninitvar]: Uninitialized variable: result.max_value # 350| result.low = low & ~b.low; # 351| result.high = high & ~b.high; # 352|-> return result; # 353| } # 354| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/double-int.h:363: error[uninitvar]: Uninitialized variable: result.max_value # 361| result.low = low ^ b.low; # 362| result.high = high ^ b.high; # 363|-> return result; # 364| } # 365| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dse.cc:307:15: warning[core.BitwiseShift]: Right shift by '65' overflows the capacity of 'unsigned long' # 305| { # 306| unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U; # 307|-> return mask >> (HOST_BITS_PER_WIDE_INT - n); # 308| } # 309| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dse.cc:1535:16: warning[core.NullDereference]: Access to field 'val_rtx' results in a dereference of a null pointer (loaded from variable 'base') # 1533| # 1534| if (group_id < 0) # 1535|-> mem_addr = base->val_rtx; # 1536| else # 1537| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dse.cc:2245:16: warning[core.NullDereference]: Access to field 'val_rtx' results in a dereference of a null pointer (loaded from variable 'base') # 2243| insn_info->read_rec = read_info; # 2244| if (group_id < 0) # 2245|-> mem_addr = base->val_rtx; # 2246| else # 2247| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dwarf2cfi.cc:2214:8: warning[core.NullDereference]: Access to field 'rule18' results in a dereference of a null pointer (loaded from variable 'fde') # 2212| if (!span) # 2213| { # 2214|-> if (fde->rule18) # 2215| /* Just verify the hard frame pointer save when doing dynamic # 2216| realignment uses expected offset. The actual queue_reg_save Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/dwarf2ctf.cc:395: warning[uninitvar]: Uninitialized variable: array_num_elements # 393| type we register here is the type of the elements in # 394| subsequent "dimensions", if there are any. */ # 395|-> arinfo.ctr_nelems = array_num_elements; # 396| # 397| array_index_type = ctf_get_AT_type (c); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/dwarf2ctf.cc:673:28: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 671| else if (dw_get_die_tag (c) == DW_TAG_unspecified_parameters) # 672| { # 673|-> func_info.ctc_flags |= CTF_FUNC_VARARG; # 674| num_args += 1; # 675| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/edit-context.cc:147:14: warning[deadcode.DeadStores]: Although the value stored to 'orig_column' is used in the enclosing expression, the value is never actually read from 'orig_column' # 145| { # 146| if (orig_column >= m_start) # 147|-> return orig_column += m_delta; # 148| else # 149| return orig_column; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/et-forest.cc:592:7: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'p_occ') # 590| t->parent_occ = NULL; # 591| # 592|-> l = p_occ->prev; # 593| p_occ->next->parent = NULL; # 594| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/et-forest.cc:650:13: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'o2') # 648| if (l == o2 || (l && l->parent != NULL)) # 649| { # 650|-> ret = o2->next; # 651| # 652| set_prev (o1, o2); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/et-forest.cc:658:13: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'o2') # 656| else if (r == o2 || (r && r->parent != NULL)) # 657| { # 658|-> ret = o2->prev; # 659| # 660| set_next (o1, o2); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tracer.cc:53: included_from: Included from here. gcc-14.0.1-20240411/gcc/fibonacci_heap.h:73:17: warning[core.NullDereference]: Access to field 'm_key' results in a dereference of a null pointer (loaded from variable 'other') # 71| int compare (fibonacci_node_t *other) # 72| { # 73|-> if (m_key < other->m_key) # 74| return -1; # 75| if (m_key > other->m_key) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:1314:8: warning[deadcode.DeadStores]: Value stored to 'body' is never read # 1312| int i; # 1313| # 1314|-> body = PATTERN (insn); # 1315| new_length = 0; # 1316| for (i = 0; i < seqn->len (); i++) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:1885:16: warning[core.NullDereference]: Array access (from variable 'start_to_bb') results in a null pointer dereference # 1883| # 1884| if (INSN_UID (insn) < bb_map_size # 1885|-> && (bb = start_to_bb[INSN_UID (insn)]) != NULL) # 1886| { # 1887| edge e; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:2440:8: warning[core.BitwiseShift]: Right operand is negative in left shift # 2438| log_align = exact_log2 (BIGGEST_ALIGNMENT / BITS_PER_UNIT); # 2439| #endif # 2440|-> ASM_OUTPUT_ALIGN (file, log_align); # 2441| } # 2442| else Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:3531:6: warning[deadcode.DeadStores]: Value stored to 'c' is never read # 3529| # 3530| p = endptr; # 3531|-> c = *p; # 3532| } # 3533| /* % followed by a digit outputs an operand the default way. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/final.cc:3550:6: warning[deadcode.DeadStores]: Value stored to 'c' is never read # 3548| # 3549| p = endptr; # 3550|-> c = *p; # 3551| } # 3552| /* % followed by punctuation: output something for that Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:190: error[uninitvar]: Uninitialized variable: max.max_value # 188| max.low = -1; # 189| max.high = -1; # 190|-> max = max.zext (i_f_bits); # 191| if (a.ugt (max)) # 192| { Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:204: error[uninitvar]: Uninitialized variable: max.max_value # 202| max.high = -1; # 203| max.low = -1; # 204|-> max = max.zext (i_f_bits); # 205| min.high = 0; # 206| min.low = 1; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:207: error[uninitvar]: Uninitialized variable: min.max_value # 205| min.high = 0; # 206| min.low = 1; # 207|-> min = min.alshift (i_f_bits, HOST_BITS_PER_DOUBLE_INT); # 208| min = min.sext (1 + i_f_bits); # 209| if (a.sgt (max)) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:250: error[uninitvar]: Uninitialized variable: max_s.max_value # 248| max_s.high = -1; # 249| max_s.low = -1; # 250|-> max_s = max_s.zext (i_f_bits); # 251| if (a_high.ugt (max_r) # 252| || (a_high == max_r && Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:251: error[uninitvar]: Uninitialized variable: max_r.max_value # 249| max_s.low = -1; # 250| max_s = max_s.zext (i_f_bits); # 251|-> if (a_high.ugt (max_r) # 252| || (a_high == max_r && # 253| a_low.ugt (max_s))) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:268: error[uninitvar]: Uninitialized variable: max_s.max_value # 266| max_s.high = -1; # 267| max_s.low = -1; # 268|-> max_s = max_s.zext (i_f_bits); # 269| min_r.high = -1; # 270| min_r.low = -1; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:273: error[uninitvar]: Uninitialized variable: min_s.max_value # 271| min_s.high = 0; # 272| min_s.low = 1; # 273|-> min_s = min_s.alshift (i_f_bits, HOST_BITS_PER_DOUBLE_INT); # 274| min_s = min_s.sext (1 + i_f_bits); # 275| if (a_high.sgt (max_r) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:275: error[uninitvar]: Uninitialized variable: max_r.max_value # 273| min_s = min_s.alshift (i_f_bits, HOST_BITS_PER_DOUBLE_INT); # 274| min_s = min_s.sext (1 + i_f_bits); # 275|-> if (a_high.sgt (max_r) # 276| || (a_high == max_r && # 277| a_low.ugt (max_s))) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:284: error[uninitvar]: Uninitialized variable: min_r.max_value # 282| overflow_p = true; # 283| } # 284|-> else if (a_high.slt (min_r) # 285| || (a_high == min_r && # 286| a_low.ult (min_s))) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:432: error[uninitvar]: Uninitialized variable: a_low.max_value # 430| # 431| /* Perform four multiplications. */ # 432|-> low_low = a_low * b_low; # 433| low_high = a_low * b_high; # 434| high_low = a_high * b_low; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:433: error[uninitvar]: Uninitialized variable: b_high.max_value # 431| /* Perform four multiplications. */ # 432| low_low = a_low * b_low; # 433|-> low_high = a_low * b_high; # 434| high_low = a_high * b_low; # 435| high_high = a_high * b_high; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:434: error[uninitvar]: Uninitialized variable: a_high.max_value # 432| low_low = a_low * b_low; # 433| low_high = a_low * b_high; # 434|-> high_low = a_high * b_low; # 435| high_high = a_high * b_high; # 436| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:440: error[uninitvar]: Uninitialized variable: temp1.max_value # 438| temp1.high = high_low.low; # 439| temp1.low = 0; # 440|-> s = low_low + temp1; # 441| if (s.ult (low_low) # 442| || s.ult (temp1)) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:448: error[uninitvar]: Uninitialized variable: temp2.max_value # 446| temp2.high = low_high.low; # 447| temp2.low = 0; # 448|-> s = temp1 + temp2; # 449| if (s.ult (temp1) # 450| || s.ult (temp2)) Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:597: warning[uninitvar]: Uninitialized variable: s.max_value # 595| # 596| /* Shift left s by 1 bit. */ # 597|-> s = s.lshift (1); # 598| # 599| } Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:666: warning[uninitvar]: Uninitialized variable: temp_low.max_value # 664| if (!unsigned_p && a->data.high < 0) /* Signed-extend temp_high. */ # 665| temp_high = temp_high.ext (b->data.low, unsigned_p); # 666|-> f->data = temp_low; # 667| overflow_p = fixed_saturate2 (f->mode, temp_high, temp_low, &f->data, # 668| sat_p); Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fixed-value.cc:974: warning[uninitvar]: Uninitialized variable: temp_low.max_value # 972| # 973| f->mode = mode; # 974|-> f->data = temp_low; # 975| # 976| if (unsigned_p == UNSIGNED_FIXED_POINT_MODE_P (f->mode)) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/fold-const.cc: scope_hint: In function ‘void fold_overflow_warning(const char*, warn_strict_overflow_code)’ gcc-14.0.1-20240411/gcc/fold-const.cc:384:13: warning[-Wformat-security]: format not a string literal and no format arguments # 384 | warning (OPT_Wstrict_overflow, gmsgid); # | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 382| } # 383| else if (issue_strict_overflow_warning (wc)) # 384|-> warning (OPT_Wstrict_overflow, gmsgid); # 385| } # 386| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/arith.cc:1376:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1374| rc = rc_tmp; # 1375| # 1376|-> gfc_replace_expr (c->expr, r); # 1377| } # 1378| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/arith.cc:1437:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1435| rc = rc_tmp; # 1436| # 1437|-> gfc_replace_expr (c->expr, r); # 1438| } # 1439| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/arith.cc:1500:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1498| rc = rc_tmp; # 1499| # 1500|-> gfc_replace_expr (c->expr, r); # 1501| } # 1502| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/check.cc:3678:22: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 3676| for (i = 0; i < nargs; i++) # 3677| for (j = i + 1; j < nargs; j++) # 3678|-> if (nlabels[i] == nlabels[j]) # 3679| goto duplicate; # 3680| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/check.cc:3678:22: warning[core.UndefinedBinaryOperatorResult]: The right operand of '==' is a garbage value # 3676| for (i = 0; i < nargs; i++) # 3677| for (j = i + 1; j < nargs; j++) # 3678|-> if (nlabels[i] == nlabels[j]) # 3679| goto duplicate; # 3680| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/check.cc:3684:62: warning[core.NullDereference]: Access to field 'name' results in a dereference of a null pointer (loaded from variable 'arg') # 3682| # 3683| duplicate: # 3684|-> gfc_error ("Duplicate argument %qs at %L to intrinsic %s", arg->name, # 3685| &arg->expr->where, gfc_current_intrinsic); # 3686| return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/data.cc:227:5: warning[core.NullDereference]: Dereference of null pointer # 225| { # 226| gfc_error ("Substring end index at %L exceeds the string length", # 227|-> &ref->u.ss.end->where); # 228| return NULL; # 229| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/dependency.cc:2109:3: warning[deadcode.DeadStores]: Value stored to 'this_dep' is never read # 2107| bool same_component = false; # 2108| # 2109|-> this_dep = GFC_DEP_ERROR; # 2110| fin_dep = GFC_DEP_ERROR; # 2111| /* Dependencies due to pointers should already have been identified. Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/error.cc:805:3: warning[deadcode.DeadStores]: Value stored to 'have_l1' is never read # 803| } # 804| # 805|-> have_l1 = 0; # 806| format = format0; # 807| n = 0; Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:961: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 959| { # 960| va_list argp; # 961|-> va_copy (argp, ap); # 962| # 963| diagnostic_info diagnostic; Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:979: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 977| } # 978| # 979|-> diagnostic_set_info (&diagnostic, gmsgid, &argp, &rich_loc, # 980| DK_WARNING); # 981| diagnostic.option_index = opt; Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:1001: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 999| } # 1000| # 1001|-> va_end (argp); # 1002| return ret; # 1003| } Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:1485: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 1483| { # 1484| va_list argp; # 1485|-> va_copy (argp, ap); # 1486| bool saved_abort_on_error = false; # 1487| Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:1490: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 1488| if (warnings_not_errors) # 1489| { # 1490|-> gfc_warning (opt, gmsgid, argp); # 1491| va_end (argp); # 1492| return; Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/gcc/fortran/error.cc:1491: error[va_list_usedBeforeStarted]: va_list 'argp' used before va_start() was called. # 1489| { # 1490| gfc_warning (opt, gmsgid, argp); # 1491|-> va_end (argp); # 1492| return; # 1493| } Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.deferred # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.f90_type # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.interface # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.interop_kind # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.is_c_interop # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/gcc/fortran/frontend-passes.cc:3302: error[uninitStructMember]: Uninitialized struct member: ts.is_iso_c # 3300| res->value.op.op1 = e1; # 3301| res->value.op.op2 = e2; # 3302|-> res->ts = ts; # 3303| # 3304| return res; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/intrinsic.cc:4446:16: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'actual') # 4444| actual = a; # 4445| } # 4446|-> actual->next = NULL; /* End the sorted argument list. */ # 4447| # 4448| return true; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/intrinsic.cc:4472:11: warning[core.NullDereference]: Access to field 'expr' results in a dereference of a null pointer (loaded from variable 'actual') # 4470| gfc_typespec ts; # 4471| # 4472|-> if (actual->expr == NULL) # 4473| continue; # 4474| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/matchexp.cc:178:13: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 176| expression pointing to it. By 7.1.7.2, any expression in # 177| parentheses shall be treated as a data entity. */ # 178|-> *result = gfc_get_parentheses (e); # 179| # 180| if (m != MATCH_YES) Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/module.cc:6686: warning[nullPointer]: Possible null pointer dereference: mod_sym # 6684| "create symbol for %s", iso_c_module_name); # 6685| # 6686|-> mod_sym->attr.flavor = FL_MODULE; # 6687| mod_sym->attr.intrinsic = 1; # 6688| mod_sym->module = gfc_get_string ("%s", iso_c_module_name); Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/module.cc:6687: warning[nullPointer]: Possible null pointer dereference: mod_sym # 6685| # 6686| mod_sym->attr.flavor = FL_MODULE; # 6687|-> mod_sym->attr.intrinsic = 1; # 6688| mod_sym->module = gfc_get_string ("%s", iso_c_module_name); # 6689| mod_sym->from_intmod = INTMOD_ISO_C_BINDING; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/module.cc:6688: warning[nullPointer]: Possible null pointer dereference: mod_sym # 6686| mod_sym->attr.flavor = FL_MODULE; # 6687| mod_sym->attr.intrinsic = 1; # 6688|-> mod_sym->module = gfc_get_string ("%s", iso_c_module_name); # 6689| mod_sym->from_intmod = INTMOD_ISO_C_BINDING; # 6690| } Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/module.cc:6689: warning[nullPointer]: Possible null pointer dereference: mod_sym # 6687| mod_sym->attr.intrinsic = 1; # 6688| mod_sym->module = gfc_get_string ("%s", iso_c_module_name); # 6689|-> mod_sym->from_intmod = INTMOD_ISO_C_BINDING; # 6690| } # 6691| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/options.cc:372:5: warning[unix.Malloc]: Argument to free() is the address of a global variable, which is not memory allocated by malloc() # 370| # 371| if (canon_source_file != gfc_source_file) # 372|-> free (CONST_CAST (char *, canon_source_file)); # 373| # 374| /* Decide which form the file will be read in as. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/options.cc:380:26: warning[unix.Malloc]: Use of memory after it is freed # 378| else # 379| { # 380|-> gfc_current_form = form_from_filename (filename); # 381| # 382| if (gfc_current_form == FORM_UNKNOWN) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/target-memory.cc:707:32: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value due to array index out of bounds # 705| for (i = 0; i < (int)len; i++) # 706| { # 707|-> if (chk[i] && (buffer[i] != data[i])) # 708| { # 709| if (loc) Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/trans-io.cc:2320: warning[nullPointer]: Possible null pointer dereference: code # 2318| /* gfortran reaches here for "print *, c_loc(xxx)". */ # 2319| if (ts->type == BT_VOID # 2320|-> && code->expr1 && code->expr1->ts.type == BT_VOID # 2321| && code->expr1->symtree # 2322| && strcmp (code->expr1->symtree->name, "c_loc") == 0) Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/trans-io.cc:2321: warning[nullPointer]: Possible null pointer dereference: code # 2319| if (ts->type == BT_VOID # 2320| && code->expr1 && code->expr1->ts.type == BT_VOID # 2321|-> && code->expr1->symtree # 2322| && strcmp (code->expr1->symtree->name, "c_loc") == 0) # 2323| { Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/fortran/trans-io.cc:2322: warning[nullPointer]: Possible null pointer dereference: code # 2320| && code->expr1 && code->expr1->ts.type == BT_VOID # 2321| && code->expr1->symtree # 2322|-> && strcmp (code->expr1->symtree->name, "c_loc") == 0) # 2323| { # 2324| ts->type = BT_INTEGER; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/trans.cc:229:3: warning[deadcode.DeadStores]: Value stored to 't1' is never read # 227| # 228| tree t1, t2; # 229|-> t1 = TREE_TYPE (rhs); # 230| t2 = TREE_TYPE (lhs); # 231| /* Make sure that the types of the rhs and the lhs are compatible Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/fortran/trans.cc:230:3: warning[deadcode.DeadStores]: Value stored to 't2' is never read # 228| tree t1, t2; # 229| t1 = TREE_TYPE (rhs); # 230|-> t2 = TREE_TYPE (lhs); # 231| /* Make sure that the types of the rhs and the lhs are compatible # 232| for scalar assignments. We should probably have something Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/fortran/trans.cc:976: warning[uninitvar]: Uninitialized variable: caf_attr.codimension # 974| # 975| if (flag_coarray == GFC_FCOARRAY_LIB # 976|-> && (corank > 0 || caf_attr.codimension)) # 977| { # 978| tree cond2, sub_caf_tree; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc-ar.cc:203:19: warning[deadcode.DeadStores]: Value stored to 'real_exe_name' during its initialization is never read # 201| if (!exe_name) # 202| { # 203|-> const char *real_exe_name = PERSONALITY; # 204| #ifdef CROSS_DIRECTORY_STRUCTURE # 205| real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcc.cc:2029: warning[nullPointer]: Possible null pointer dereference: sl # 2027| gcc_assert (sl); # 2028| # 2029|-> if (sl->alloc_p) # 2030| { # 2031| const char *old = *spec; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:2110:5: warning[unix.Malloc]: Argument to free() is the address of a global variable, which is not memory allocated by malloc() # 2108| /* Free the old spec. */ # 2109| if (old_spec && sl->alloc_p) # 2110|-> free (CONST_CAST (char *, old_spec)); # 2111| # 2112| sl->user_p = user_p; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:2679:8: warning[unix.Malloc]: Use of memory after it is freed # 2677| struct temp_file *temp; # 2678| for (temp = failure_delete_queue; temp; temp = temp->next) # 2679|-> if (! filename_cmp (name, temp->name)) # 2680| { # 2681| free (name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:2851:8: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 2849| && !pl->require_machine_suffix && multiarch_dir) # 2850| { # 2851|-> memcpy (path + len, multiarch_suffix, multiarch_len + 1); # 2852| ret = callback (path, callback_info); # 2853| if (ret) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:3538:21: warning[core.NullDereference]: Access to field 'user_seconds' results in a dereference of a null pointer (loaded from variable 'pt') # 3536| double ut, st; # 3537| # 3538|-> ut = ((double) pt->user_seconds # 3539| + (double) pt->user_microseconds / 1.0e6); # 3540| st = ((double) pt->system_seconds Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:5298:16: warning[deadcode.DeadStores]: Although the value stored to 'temp' is used in the enclosing expression, the value is never actually read from 'temp' # 5296| if (dumpbase_ext # 5297| ? (blen > (xlen = strlen (dumpbase_ext)) # 5298|-> && strcmp ((temp = (obase + blen - xlen)), # 5299| dumpbase_ext) == 0) # 5300| : ((temp = strrchr (obase + 1, '.')) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:5632:7: warning[deadcode.DeadStores]: Value stored to 'first_time' is never read # 5630| if (!first_time) # 5631| obstack_grow (&collect_obstack, " ", 1); # 5632|-> first_time = false; # 5633| # 5634| obstack_grow (&collect_obstack, "'-dumpdir' '", 12); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcc.cc:6403:4: warning[deadcode.DeadStores]: Value stored to 'adjusted_suffix' is never read # 6401| if (adjusted_suffix) # 6402| { # 6403|-> adjusted_suffix = false; # 6404| suffix--; # 6405| suffix_length++; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcov-dump.cc:390:25: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' # 388| printf ("%cfake", c), c = ','; # 389| if (flags & GCOV_ARC_FALLTHROUGH) # 390|-> printf ("%cfall", c), c = ','; # 391| printf (")"); # 392| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcov.cc:2353:10: warning[core.NullDereference]: Access to field 'pred' results in a dereference of a null pointer (loaded from field 'dst') # 2351| hold. */ # 2352| if (blk->is_call_site && arc->fall_through # 2353|-> && arc->dst->pred == arc && !arc->pred_next) # 2354| arc->dst->is_call_return = 1; # 2355| } Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2445: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2443| inv_arc = arc; # 2444| } # 2445|-> dst = inv_arc->dst; # 2446| inv_arc->count_valid = 1; # 2447| inv_arc->count = total; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcov.cc:2445:14: warning[core.NullDereference]: Access to field 'dst' results in a dereference of a null pointer (loaded from variable 'inv_arc') # 2443| inv_arc = arc; # 2444| } # 2445|-> dst = inv_arc->dst; # 2446| inv_arc->count_valid = 1; # 2447| inv_arc->count = total; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2446: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2444| } # 2445| dst = inv_arc->dst; # 2446|-> inv_arc->count_valid = 1; # 2447| inv_arc->count = total; # 2448| blk->num_succ--; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2447: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2445| dst = inv_arc->dst; # 2446| inv_arc->count_valid = 1; # 2447|-> inv_arc->count = total; # 2448| blk->num_succ--; # 2449| dst->num_pred--; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcov.cc:2449:8: warning[core.NullDereference]: Access to field 'num_pred' results in a dereference of a null pointer (loaded from variable 'dst') # 2447| inv_arc->count = total; # 2448| blk->num_succ--; # 2449|-> dst->num_pred--; # 2450| if (dst->count_valid) # 2451| { Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2481: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2479| inv_arc = arc; # 2480| } # 2481|-> src = inv_arc->src; # 2482| inv_arc->count_valid = 1; # 2483| inv_arc->count = total; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcov.cc:2481:14: warning[core.NullDereference]: Access to field 'src' results in a dereference of a null pointer (loaded from variable 'inv_arc') # 2479| inv_arc = arc; # 2480| } # 2481|-> src = inv_arc->src; # 2482| inv_arc->count_valid = 1; # 2483| inv_arc->count = total; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2482: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2480| } # 2481| src = inv_arc->src; # 2482|-> inv_arc->count_valid = 1; # 2483| inv_arc->count = total; # 2484| blk->num_pred--; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/gcov.cc:2483: warning[nullPointer]: Possible null pointer dereference: inv_arc # 2481| src = inv_arc->src; # 2482| inv_arc->count_valid = 1; # 2483|-> inv_arc->count = total; # 2484| blk->num_pred--; # 2485| src->num_succ--; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcse.cc:1156:28: warning[core.NullDereference]: Access to field 'next_same_hash' results in a dereference of a null pointer (loaded from variable 'last_expr') # 1154| else # 1155| /* Add EXPR to end of this hash chain. */ # 1156|-> last_expr->next_same_hash = cur_expr; # 1157| # 1158| /* Set the fields of the expr element. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genemit.cc:437:17: warning[core.NullDereference]: Access to field 'num_elem' results in a dereference of a null pointer (loaded from field 'rt_rtvec') # 435| rtx pattern = add_implicit_parallel (XVEC (insn, 1)); # 436| /* ??? This is the traditional behavior, but seems suspect. */ # 437|-> char *used = (XVECLEN (insn, 1) == 1 # 438| ? NULL # 439| : XCNEWVEC (char, stats.num_generator_args)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genemit.cc:655:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 653| int i; # 654| # 655|-> fprintf (file, "\n\nvoid\nadd_clobbers (rtx pattern ATTRIBUTE_UNUSED, int insn_code_number)\n"); # 656| fprintf (file, "{\n"); # 657| fprintf (file, " switch (insn_code_number)\n"); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype-parse.cc:996:7: warning[deadcode.DeadStores]: Value stored to 'kind' is never read # 994| /* Do not look inside user defined structures. */ # 995| fields = NULL; # 996|-> kind = TYPE_USER_STRUCT; # 997| consume_balanced ('{', '}'); # 998| return create_user_defined_type (s, &lexer_line); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype-state.cc:359:19: warning[deadcode.DeadStores]: Although the value stored to 'curoff' is used in the enclosing expression, the value is never actually read from 'curoff' # 357| { # 358| state_line++; # 359|-> state_bol = curoff = ftell (state_file); # 360| goto again; # 361| }; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype-state.cc:375:16: warning[deadcode.DeadStores]: Although the value stored to 'curoff' is used in the enclosing expression, the value is never actually read from 'curoff' # 373| { # 374| state_line++; # 375|-> state_bol = curoff = ftell (state_file); # 376| } # 377| goto again; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype-state.cc:2278:19: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'previous') # 2276| else # 2277| { # 2278|-> previous->next = tmp; # 2279| previous = tmp; # 2280| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype.cc:359:13: warning[deadcode.DeadStores]: Value stored to 'committed' during its initialization is never read # 357| char *buf = XNEWVEC (char, bufsz); # 358| char *here = buf; # 359|-> char *committed = buf; # 360| char *limit = buf + bufsz; # 361| char *line; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype.cc:4600:12: warning[core.NullDereference]: Access to field 'started_p' results in a dereference of a null pointer (loaded from variable 'fli') # 4598| if (fli->f == f) # 4599| break; # 4600|-> if (!fli->started_p) # 4601| { # 4602| fli->started_p = 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gengtype.cc:4707:12: warning[core.NullDereference]: Access to field 'started_p' results in a dereference of a null pointer (loaded from variable 'fli') # 4705| if (fli->f == f) # 4706| break; # 4707|-> if (!fli->started_p) # 4708| { # 4709| fli->started_p = 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:573:10: warning[core.NullDereference]: Access to field 'kind' results in a dereference of a null pointer (loaded from variable 'id') # 571| is_a_helper <operator_id *>::test (id_base *id) # 572| { # 573|-> return id->kind == id_base::CODE; # 574| } # 575| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:589:10: warning[core.NullDereference]: Access to field 'kind' results in a dereference of a null pointer (loaded from variable 'id') # 587| is_a_helper <user_id *>::test (id_base *id) # 588| { # 589|-> return id->kind == id_base::USER; # 590| } # 591| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:964:10: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'op') # 962| is_a_helper <capture *>::test (operand *op) # 963| { # 964|-> return op->type == operand::OP_CAPTURE; # 965| } # 966| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:1973:15: warning[core.NullDereference]: Access to field 'location' results in a dereference of a null pointer (loaded from field 'op') # 1971| location_t p_loc = 0; # 1972| if (p->type == dt_node::DT_OPERAND) # 1973|-> p_loc = as_a <dt_operand *> (p)->op->location; # 1974| location_t op_loc = 0; # 1975| if (ops[i]->type == dt_node::DT_OPERAND) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2020:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'n' # 2018| dt_operand *parent_ = safe_as_a<dt_operand *> (parent); # 2019| dt_operand *n = new dt_operand (DT_OPERAND, op, 0, parent_, pos); # 2020|-> return append_node (n); # 2021| } # 2022| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2030:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'n' # 2028| dt_operand *parent_ = safe_as_a<dt_operand *> (parent); # 2029| dt_operand *n = new dt_operand (DT_TRUE, op, 0, parent_, pos); # 2030|-> return append_node (n); # 2031| } # 2032| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2041:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'n' # 2039| dt_operand *parent_ = as_a<dt_operand *> (parent); # 2040| dt_operand *n = new dt_operand (DT_MATCH, op, match_dop, parent_, pos); # 2041|-> return append_node (n); # 2042| } # 2043| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2064:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'n' # 2062| fprintf (stderr, "\n"); # 2063| } # 2064|-> return append_node (n); # 2065| } # 2066| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2411:2: warning[deadcode.DeadStores]: Value stored to 'opr' is never read # 2409| id_base *opr = e->operation; # 2410| if (user_id *uid = dyn_cast <user_id *> (opr)) # 2411|-> opr = uid->substitutes[0]; # 2412| for (unsigned i = 0; i < e->ops.length (); ++i) # 2413| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2489:7: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'n') # 2487| (t->val.node.node)->ident.str)) # 2488| && is_a <predicate_id *> (id))) # 2489|-> && n->type == CPP_OPEN_PAREN) # 2490| p_depth++; # 2491| else if (t->type == CPP_CLOSE_PAREN Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2496:13: warning[core.NullDereference]: Access to field 'type' results in a dereference of a null pointer (loaded from variable 'n') # 2494| else if (p_depth == 0 # 2495| && t->type == CPP_ATSIGN # 2496|-> && (n->type == CPP_NUMBER # 2497| || n->type == CPP_NAME) # 2498| && !(n->flags & PREV_WHITE)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2508:14: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'where') # 2506| if (! where) # 2507| fatal_at (n, "unknown capture id '%s'", id1); # 2508|-> info[info[*where].same_as].force_no_side_effects_p = true; # 2509| if (verbose >= 1 # 2510| && !gimple) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:2794:36: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'cid') # 2792| if (!cid) # 2793| fatal_at (token, "unknown capture id"); # 2794|-> fprintf (f, "captures[%u]", *cid); # 2795| ++i; # 2796| continue; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/gcc/genmatch.cc:4987: error[danglingLifetime]: Non-local variable 'oper_lists_set' will use pointer to local variable 'olist'. # 4985| /* Reset oper_lists and set. */ # 4986| hash_set <user_id *> olist; # 4987|-> oper_lists_set = &olist; # 4988| oper_lists = vNULL; # 4989| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:5085:14: warning[core.NullDereference]: Access to field 'nargs' results in a dereference of a null pointer (loaded from variable 'idb') # 5083| # 5084| if (arity == -1) # 5085|-> arity = idb->nargs; # 5086| else if (idb->nargs == -1) # 5087| ; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:5086:13: warning[core.NullDereference]: Access to field 'nargs' results in a dereference of a null pointer (loaded from variable 'idb') # 5084| if (arity == -1) # 5085| arity = idb->nargs; # 5086|-> else if (idb->nargs == -1) # 5087| ; # 5088| else if (idb->nargs != arity) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:5172:11: warning[deadcode.DeadStores]: Although the value stored to 'token' is used in the enclosing expression, the value is never actually read from 'token' # 5170| int arity = -1; # 5171| # 5172|-> while ((token = peek_ident ()) != 0) # 5173| { # 5174| token = peek (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:5182:10: warning[core.NullDereference]: Access to field 'nargs' results in a dereference of a null pointer (loaded from variable 'idb') # 5180| # 5181| if (arity == -1) # 5182|-> arity = idb->nargs; # 5183| else if (idb->nargs == -1) # 5184| ; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmatch.cc:5183:16: warning[core.NullDereference]: Access to field 'nargs' results in a dereference of a null pointer (loaded from variable 'idb') # 5181| if (arity == -1) # 5182| arity = idb->nargs; # 5183|-> else if (idb->nargs == -1) # 5184| ; # 5185| else if (arity != idb->nargs) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmodes.cc:418:17: warning[core.NullDereference]: Access to field 'bytesize' results in a dereference of a null pointer (loaded from field 'component') # 416| not more aligned than their contents. */ # 417| if (m->cl == MODE_COMPLEX_INT || m->cl == MODE_COMPLEX_FLOAT) # 418|-> alignment = m->component->bytesize; # 419| else # 420| alignment = m->bytesize; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genmodes.cc:906:7: warning[core.NullDereference]: Access to field 'bytesize' results in a dereference of a null pointer (loaded from field 'component') # 904| } # 905| # 906|-> if (m->component->bytesize > n->component->bytesize) # 907| return 1; # 908| else if (m->component->bytesize < n->component->bytesize) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genopinit.cc:237:69: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 235| last_kind[j++] = i - 1; # 236| } # 237|-> fprintf (h_file, " FIRST_CONV_OPTAB = %s,\n", optabs[last_kind[0]+1].name); # 238| fprintf (h_file, " LAST_CONVLIB_OPTAB = %s,\n", optabs[last_kind[1]].name); # 239| fprintf (h_file, " LAST_CONV_OPTAB = %s,\n", optabs[last_kind[2]].name); Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/genopinit.cc:238: warning[uninitvar]: Uninitialized variable: last_kind # 236| } # 237| fprintf (h_file, " FIRST_CONV_OPTAB = %s,\n", optabs[last_kind[0]+1].name); # 238|-> fprintf (h_file, " LAST_CONVLIB_OPTAB = %s,\n", optabs[last_kind[1]].name); # 239| fprintf (h_file, " LAST_CONV_OPTAB = %s,\n", optabs[last_kind[2]].name); # 240| fprintf (h_file, " FIRST_NORM_OPTAB = %s,\n", optabs[last_kind[2]+1].name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genopinit.cc:238:52: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 236| } # 237| fprintf (h_file, " FIRST_CONV_OPTAB = %s,\n", optabs[last_kind[0]+1].name); # 238|-> fprintf (h_file, " LAST_CONVLIB_OPTAB = %s,\n", optabs[last_kind[1]].name); # 239| fprintf (h_file, " LAST_CONV_OPTAB = %s,\n", optabs[last_kind[2]].name); # 240| fprintf (h_file, " FIRST_NORM_OPTAB = %s,\n", optabs[last_kind[2]+1].name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genopinit.cc:239:49: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 237| fprintf (h_file, " FIRST_CONV_OPTAB = %s,\n", optabs[last_kind[0]+1].name); # 238| fprintf (h_file, " LAST_CONVLIB_OPTAB = %s,\n", optabs[last_kind[1]].name); # 239|-> fprintf (h_file, " LAST_CONV_OPTAB = %s,\n", optabs[last_kind[2]].name); # 240| fprintf (h_file, " FIRST_NORM_OPTAB = %s,\n", optabs[last_kind[2]+1].name); # 241| fprintf (h_file, " LAST_NORMLIB_OPTAB = %s,\n", optabs[last_kind[3]].name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genopinit.cc:241:52: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 239| fprintf (h_file, " LAST_CONV_OPTAB = %s,\n", optabs[last_kind[2]].name); # 240| fprintf (h_file, " FIRST_NORM_OPTAB = %s,\n", optabs[last_kind[2]+1].name); # 241|-> fprintf (h_file, " LAST_NORMLIB_OPTAB = %s,\n", optabs[last_kind[3]].name); # 242| fprintf (h_file, " LAST_NORM_OPTAB = %s\n", optabs[i-1].name); # 243| fprintf (h_file, "};\n\n"); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genoutput.cc:860:7: warning[deadcode.DeadStores]: Value stored to 'alt_mismatch' is never read # 858| if (!alt_mismatch) # 859| { # 860|-> alt_mismatch = true; # 861| error_at (d->loc, # 862| "alternative number mismatch: " Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genpreds.cc:866:7: warning[core.NullDereference]: Access to field 'code' results in a dereference of a null pointer (loaded from variable 'exp') # 864| /* Consider relaxing this requirement in the future. */ # 865| if (regclass # 866|-> || GET_CODE (exp) != AND # 867| || GET_CODE (XEXP (exp, 0)) != MATCH_CODE # 868| || strcmp (XSTR (XEXP (exp, 0), 0), Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genrecog.cc:1899:36: warning[core.NullDereference]: Access to field 'to' results in a dereference of a null pointer (loaded from field 'first') # 1897| /* Follow the first chain down, as one example of a path that needs # 1898| to contain the common test. */ # 1899|-> for (decision *d = outer; d; d = d->first->to->first) # 1900| { # 1901| transition *trans = d->singleton (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/genrecog.cc:4578:34: warning[core.NullDereference]: Access to field 'id' results in a dereference of a null pointer (loaded from field 'pos') # 4576| printf ("operands[%d]", test.pos_operand); # 4577| else # 4578|-> printf ("x%d", os->id_to_var[test.pos->id]); # 4579| } # 4580| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gensupport.cc:3207:3: warning[deadcode.DeadStores]: Value stored to 'truth' is never read # 3205| # 3206| cur = define_insn_queue; # 3207|-> truth = 1; # 3208| while (cur) # 3209| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gensupport.cc:3219:3: warning[deadcode.DeadStores]: Value stored to 'truth' is never read # 3217| # 3218| cur = other_queue; # 3219|-> truth = 1; # 3220| while (cur) # 3221| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ggc-common.cc:649:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 647| } # 648| #endif # 649|-> memcpy (this_object, state.ptrs[i]->obj, state.ptrs[i]->size); # 650| if (state.ptrs[i]->reorder_fn != NULL) # 651| state.ptrs[i]->reorder_fn (state.ptrs[i]->obj, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ggc-page.cc:1340:11: warning[deadcode.DeadStores]: Although the value stored to 'bit' is used in the enclosing expression, the value is never actually read from 'bit' # 1338| if ((entry->in_use_p[word] >> bit) & 1) # 1339| { # 1340|-> word = bit = 0; # 1341| while (~entry->in_use_p[word] == 0) # 1342| ++word; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ggc-page.cc:1987:23: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'p') # 1985| do # 1986| { # 1987|-> page_entry *next = p->next; # 1988| # 1989| /* Loop until all entries have been examined. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-isel.cc:291:17: warning[core.NullDereference]: Dereference of null pointer # 289| } # 290| } # 291|-> cmp_op_mode = TYPE_MODE (TREE_TYPE (op0a)); # 292| unsignedp = TYPE_UNSIGNED (TREE_TYPE (op0a)); # 293| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-iterator.cc:956:24: warning[deadcode.DeadStores]: Value stored to 'gsi' during its initialization is never read # 954| edge_before_returns_twice_call (basic_block bb) # 955| { # 956|-> gimple_stmt_iterator gsi = gsi_start_nondebug_bb (bb); # 957| gcc_checking_assert (is_gimple_call (gsi_stmt (gsi)) # 958| && (gimple_call_flags (gsi_stmt (gsi)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-iterator.cc:987:22: warning[core.NullDereference]: Access to field 'src' results in a dereference of a null pointer (loaded from variable 'ad_edge') # 985| { # 986| other_edge = split_block_after_labels (bb); # 987|-> e = make_edge (ad_edge->src, other_edge->dest, EDGE_ABNORMAL); # 988| for (gphi_iterator gsi = gsi_start_phis (other_edge->src); # 989| !gsi_end_p (gsi); gsi_next (&gsi)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-harden-conditionals.cc:33: included_from: Included from here. gcc-14.0.1-20240411/gcc/gimple-iterator.h:231:12: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from field 'ptr') # 229| gsi_next (gimple_stmt_iterator *i) # 230| { # 231|-> i->ptr = i->ptr->next; # 232| } # 233| Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/gimple-range-gori.cc: scope_hint: In member function ‘void range_def_chain::dump(FILE*, basic_block, const char*)’ gcc-14.0.1-20240411/gcc/gimple-range-gori.cc:318:19: warning[-Wformat-security]: format not a string literal and no format arguments # 318 | fprintf (f, prefix); # | ~~~~~~~~^~~~~~~~~~~ # 316| if (chain && !bitmap_empty_p (chain)) # 317| { # 318|-> fprintf (f, prefix); # 319| print_generic_expr (f, name, TDF_SLIM); # 320| fprintf (f, " : "); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-ssa-warn-restrict.cc:201:28: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 199| bool strict () const # 200| { # 201|-> return (detect_overlap != &builtin_access::generic_overlap # 202| && detect_overlap != &builtin_access::no_overlap); # 203| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-ssa-warn-restrict.cc:1849:12: warning[core.NullDereference]: Dereference of null pointer # 1847| func, rangestr[0]); # 1848| } # 1849|-> else if (TREE_CODE (ref.ref) == MEM_REF) # 1850| { # 1851| tree refop = TREE_OPERAND (ref.ref, 0); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-streamer-in.cc:73:67: warning[core.NullDereference]: Access to field 'dest_idx' results in a dereference of a null pointer (loaded from variable 'e') # 71| add_phi_arg (result, def, e, UNKNOWN_LOCATION); # 72| /* Read location and lexical block information. */ # 73|-> location_t *arg_locp = gimple_phi_arg_location_ptr (result, e->dest_idx); # 74| data_in->location_cache.input_location_and_block (arg_locp, &bp, ib, # 75| data_in); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:70:12: warning[core.NullDereference]: Access to field 'removed_stmt' results in a dereference of a null pointer (loaded from variable 'wi') # 68| } # 69| # 70|-> if (!wi->removed_stmt) # 71| gsi_next (&gsi); # 72| else Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/gcc/gimple-walk.cc:620: error[returnDanglingLifetime]: Returning pointer to local variable 'handled_ops' that will be invalid when returning. # 618| tree_ret = callback_stmt (gsi, &handled_ops, wi); # 619| if (handled_ops) # 620|-> return tree_ret; # 621| # 622| /* If CALLBACK_STMT did not handle operands, it should not have Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:648:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 646| callback_stmt, callback_op, wi); # 647| if (ret) # 648|-> return wi->callback_result; # 649| break; # 650| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:656:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 654| callback_stmt, callback_op, wi); # 655| if (ret) # 656|-> return wi->callback_result; # 657| break; # 658| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:663:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 661| callback_op, wi); # 662| if (ret) # 663|-> return wi->callback_result; # 664| break; # 665| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:672:11: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 670| callback_stmt, callback_op, wi); # 671| if (ret) # 672|-> return wi->callback_result; # 673| ret = walk_gimple_seq_mod (gimple_eh_else_e_body_ptr (eh_else_stmt), # 674| callback_stmt, callback_op, wi); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:676:11: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 674| callback_stmt, callback_op, wi); # 675| if (ret) # 676|-> return wi->callback_result; # 677| } # 678| break; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:684:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 682| wi); # 683| if (ret) # 684|-> return wi->callback_result; # 685| # 686| ret = walk_gimple_seq_mod (gimple_try_cleanup_ptr (stmt), callback_stmt, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:689:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 687| callback_op, wi); # 688| if (ret) # 689|-> return wi->callback_result; # 690| break; # 691| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:696:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 694| callback_op, wi); # 695| if (ret) # 696|-> return wi->callback_result; # 697| # 698| /* FALL THROUGH. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:717:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 715| callback_op, wi); # 716| if (ret) # 717|-> return wi->callback_result; # 718| break; # 719| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:724:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 722| callback_op, wi); # 723| if (ret) # 724|-> return wi->callback_result; # 725| break; # 726| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:731:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 729| callback_stmt, callback_op, wi); # 730| if (ret) # 731|-> return wi->callback_result; # 732| break; # 733| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-walk.cc:739:9: warning[core.NullDereference]: Access to field 'callback_result' results in a dereference of a null pointer (loaded from variable 'wi') # 737| callback_stmt, callback_op, wi); # 738| if (ret) # 739|-> return wi->callback_result; # 740| break; # 741| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-iterator.cc:26: included_from: Included from here. gcc-14.0.1-20240411/gcc/gimple.h:1780:15: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer # 1778| gimple_seq_set_last (gimple_seq *ps, gimple_seq_node last) # 1779| { # 1780|-> (*ps)->prev = last; # 1781| } # 1782| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-threadupdate.cc:25: included_from: Included from here. gcc-14.0.1-20240411/gcc/gimple.h:1823:13: warning[core.NullDereference]: Access to field 'flags' results in a dereference of a null pointer (loaded from variable 'bb') # 1821| bb_seq_addr (basic_block bb) # 1822| { # 1823|-> return (!(bb->flags & BB_RTL)) ? &bb->il.gimple.seq : NULL; # 1824| } # 1825| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/godump.cc:629:19: warning[core.DivideZero]: Division by zero # 627| unsigned int index, unsigned int *ret_offset) # 628| { # 629|-> if (from_offset % align_units > 0) # 630| from_offset += align_units - (from_offset % align_units); # 631| gcc_assert (to_offset >= from_offset); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/shrink-wrap.cc:26: included_from: Included from here. gcc-14.0.1-20240411/gcc/target.h:53: included_from: Included from here. gcc-14.0.1-20240411/gcc/hard-reg-set.h:200:5: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 198| { # 199| set.elts[bit / UHOST_BITS_PER_WIDE_INT] # 200|-> |= HARD_CONST (1) << (bit % UHOST_BITS_PER_WIDE_INT); # 201| } # 202| Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/hard-reg-set.h:296: warning[objectIndex]: The address of local variable 'set' might be accessed at non-zero index. # 294| if (iter->word_no < iter->length) # 295| { # 296|-> iter->bits = iter->pelt[iter->word_no]; # 297| iter->bits >>= min % HARD_REG_ELT_BITS; # 298| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gcse.cc:139: included_from: Included from here. gcc-14.0.1-20240411/gcc/target.h:53: included_from: Included from here. gcc-14.0.1-20240411/gcc/hard-reg-set.h:302:10: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'set' is still referred to by the stack variable 'hrsi' upon returning to the caller. This will be a dangling reference # 300| min += !iter->bits; # 301| } # 302|-> *regno = min; # 303| } # 304| Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/hash-table.cc:99: error[arrayIndexOutOfBounds]: Array 'prime_tab[30]' accessed at index 30, which is out of bounds. # 97| # 98| /* If we've run out of primes, abort. */ # 99|-> gcc_assert (n <= prime_tab[low].prime); # 100| # 101| return low; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-ssa-warn-alloca.cc:22: included_from: Included from here. gcc-14.0.1-20240411/gcc/system.h:1250: included_from: Included from here. gcc-14.0.1-20240411/gcc/hwint.h:314:61: warning[core.BitwiseShift]: Left shift by '64' overflows the capacity of 'unsigned long' # 312| gcc_checking_assert (prec < HOST_BITS_PER_WIDE_INT); # 313| int shift = HOST_BITS_PER_WIDE_INT - prec; # 314|-> return ((HOST_WIDE_INT) ((unsigned HOST_WIDE_INT) src << shift)) >> shift; # 315| } # 316| #else Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/input.cc:1704: warning[objectIndex]: The address of local variable 'strloc' might be accessed at non-zero index. # 1702| /* Get range of strloc. We will use it to locate the start and finish # 1703| of the literal token within the line. */ # 1704|-> source_range src_range = get_range_from_loc (line_table, strlocs[i]); # 1705| # 1706| if (src_range.m_start >= LINEMAPS_MACRO_LOWEST_LOCATION (line_table)) Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/ipa-devirt.cc: scope_hint: In function ‘void warn_odr(tree, tree, tree, tree, bool, bool*, const char*)’ gcc-14.0.1-20240411/gcc/ipa-devirt.cc:967:10: warning[-Wformat-security]: format not a string literal and no format arguments # 967 | inform (DECL_SOURCE_LOCATION (decl2), reason); # | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 965| else # 966| return; # 967|-> inform (DECL_SOURCE_LOCATION (decl2), reason); # 968| # 969| if (warned) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-param-manipulation.cc:337:33: warning[core.NullDereference]: Dereference of null pointer # 335| { # 336| if (new_reversed) # 337|-> TREE_CHAIN (new_arg_types) = void_list_node; # 338| else # 339| new_reversed = void_list_node; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-param-manipulation.cc:1392:43: warning[core.NullDereference]: Dereference of null pointer # 1390| remap_with_debug_expressions (&val); # 1391| # 1392|-> tree vexpr = build_debug_expr_decl (TREE_TYPE (val)); # 1393| m_dead_stmt_debug_equiv.put (def, val); # 1394| m_dead_ssa_debug_equiv.put (dead_ssa, vexpr); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-polymorphic-call.cc:379:11: warning[core.NullDereference]: Dereference of null pointer # 377| no_useful_type_info: # 378| if (maybe_derived_type && !speculative # 379|-> && TREE_CODE (outer_type) == RECORD_TYPE # 380| && TREE_CODE (otr_type) == RECORD_TYPE # 381| && TYPE_BINFO (otr_type) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-polymorphic-call.cc:380:11: warning[core.NullDereference]: Dereference of null pointer # 378| if (maybe_derived_type && !speculative # 379| && TREE_CODE (outer_type) == RECORD_TYPE # 380|-> && TREE_CODE (otr_type) == RECORD_TYPE # 381| && TYPE_BINFO (otr_type) # 382| && !offset Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-polymorphic-call.cc:991:10: warning[core.NullDereference]: Dereference of null pointer # 989| if (TREE_CODE (base_pointer) == SSA_NAME # 990| && SSA_NAME_IS_DEFAULT_DEF (base_pointer) # 991|-> && TREE_CODE (SSA_NAME_VAR (base_pointer)) == PARM_DECL) # 992| { # 993| /* See if parameter is THIS pointer of a method. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-polymorphic-call.cc:1791:25: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'aa_walk_budget_p') # 1789| if (dump_file) # 1790| fprintf (dump_file, " AA walk budget exhausted.\n"); # 1791|-> *aa_walk_budget_p = 0; # 1792| return false; # 1793| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:2171:34: warning[core.CallAndMessage]: Called C++ object pointer is null # 2169| { # 2170| gcc_checking_assert (gsi_one_before_end_p (gsi)); # 2171|-> add_call_edges_for_seq (nseq, eft->count ()); # 2172| gsi_insert_seq_on_edge_immediate (eft, nseq); # 2173| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:2186:36: warning[core.CallAndMessage]: Called C++ object pointer is null # 2184| if (eh_lp) # 2185| { # 2186|-> add_call_edges_for_seq (seq, eeh->count ()); # 2187| gsi_insert_seq_on_edge_immediate (eeh, seq); # 2188| return; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:3138:11: warning[deadcode.DeadStores]: Although the value stored to 'then_bb' is used in the enclosing expression, the value is never actually read from 'then_bb' # 3136| cfg_count = profile_count::from_gcov_type (BB_FREQ_MAX).guessed_local (); # 3137| # 3138|-> bb = then_bb = else_bb = return_bb # 3139| = init_lowered_empty_function (thunk_fndecl, true, cfg_count); # 3140| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:3138:21: warning[deadcode.DeadStores]: Although the value stored to 'else_bb' is used in the enclosing expression, the value is never actually read from 'else_bb' # 3136| cfg_count = profile_count::from_gcov_type (BB_FREQ_MAX).guessed_local (); # 3137| # 3138|-> bb = then_bb = else_bb = return_bb # 3139| = init_lowered_empty_function (thunk_fndecl, true, cfg_count); # 3140| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:3138:31: warning[deadcode.DeadStores]: Although the value stored to 'return_bb' is used in the enclosing expression, the value is never actually read from 'return_bb' # 3136| cfg_count = profile_count::from_gcov_type (BB_FREQ_MAX).guessed_local (); # 3137| # 3138|-> bb = then_bb = else_bb = return_bb # 3139| = init_lowered_empty_function (thunk_fndecl, true, cfg_count); # 3140| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:3338:25: warning[core.NullDereference]: Dereference of null pointer # 3336| vaptr = NULL_TREE; # 3337| # 3338|-> DECL_NAME (wmptr) = get_watermark_ptr (); # 3339| DECL_ARTIFICIAL (wmptr) = 1; # 3340| DECL_IGNORED_P (wmptr) = 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-strub.cc:3415:53: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 3413| if (DECL_STRUCT_FUNCTION (nnode->decl)->calls_alloca # 3414| || is_stdarg || apply_args) # 3415|-> for (cgraph_edge *e = nnode->callees, *enext; e; e = enext) # 3416| { # 3417| if (!e->call_stmt) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-build.cc:2605:7: warning[deadcode.DeadStores]: Value stored to 'parent' is never read # 2603| if (a_node == ira_loop_tree_root) # 2604| continue; # 2605|-> parent = a_node->parent; # 2606| regno = ALLOCNO_REGNO (a); # 2607| if (ALLOCNO_CAP_MEMBER (a) != NULL) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-build.cc:2606:7: warning[deadcode.DeadStores]: Value stored to 'regno' is never read # 2604| continue; # 2605| parent = a_node->parent; # 2606|-> regno = ALLOCNO_REGNO (a); # 2607| if (ALLOCNO_CAP_MEMBER (a) != NULL) # 2608| ira_assert (ALLOCNO_CAP (a) != NULL); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-build.cc:2920:15: warning[core.NullDereference]: Access to field 'max' results in a dereference of a null pointer # 2918| object_range_compare_func). */ # 2919| while (first_not_finished < i # 2920|-> && start > OBJECT_MAX (ira_object_id_map # 2921| [first_not_finished])) # 2922| first_not_finished++; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-conflicts.cc:431:7: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value # 429| if (!REG_SUBREG_P (another_reg) || op_num == i # 430| || recog_data.operand_type[i] != OP_OUT # 431|-> || bound_p[i] # 432| || (!can_use_same_reg_p (insn, i, op_num) # 433| && (recog_data.constraints[op_num][0] != '%' Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-conflicts.cc:577:21: warning[deadcode.DeadStores]: Value stored to 'another_a' during its initialization is never read # 575| { # 576| ira_object_t another_obj = ira_object_id_map[i]; # 577|-> ira_allocno_t another_a = OBJECT_ALLOCNO (obj); # 578| # 579| ira_assert (ira_reg_classes_intersect_p Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-costs.cc:1474:16: warning[core.NullDereference]: Array access results in an undefined pointer dereference # 1472| XEXP (op_mem, 0), # 1473| 0, MEM, SCRATCH, frequency * 2); # 1474|-> else if (constraints[i][0] == 'p' # 1475| || (insn_extra_address_constraint # 1476| (lookup_constraint (constraints[i])))) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-costs.cc:1494:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1492| constraints. We assume the modes are the same. */ # 1493| for (j = 0; j < recog_data.n_operands; j++) # 1494|-> xconstraints[j] = constraints[j]; # 1495| # 1496| xconstraints[i] = constraints[i+1]; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-emit.cc:635:5: warning[core.NullDereference]: Access to field 'hard_regno' results in a dereference of a null pointer (loaded from variable 'parent_allocno') # 633| fprintf (ira_dump_file, " %i vs parent %i:", # 634| ALLOCNO_HARD_REGNO (allocno), # 635|-> ALLOCNO_HARD_REGNO (parent_allocno)); # 636| set_allocno_reg (allocno, ira_create_new_reg (original_reg)); # 637| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-emit.cc:796:7: warning[deadcode.DeadStores]: Value stored to 'to' is never read # 794| { # 795| from = move->from; # 796|-> to = move->to; # 797| if ((hard_regno = ALLOCNO_HARD_REGNO (from)) >= 0) # 798| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ira-emit.cc:900:18: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'last') # 898| move = move_vec[i]; # 899| move->next = NULL; # 900|-> last->next = move; # 901| last = move; # 902| } Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/gcc/jump.cc:1465: error[danglingTemporaryLifetime]: Using pointer that is a temporary. # 1463| loc = &PATTERN (jump); # 1464| # 1465|-> redirect_exp_1 (loc, JUMP_LABEL (jump), nlabel, jump); # 1466| return num_validated_changes () > ochanges; # 1467| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-invariant.cc:989:20: warning[deadcode.DeadStores]: Value stored to 'regno' during its initialization is never read # 987| if (!defs) # 988| { # 989|-> unsigned int regno = DF_REF_REGNO (use); # 990| # 991| /* If this is the use of an uninitialized argument register that is Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:517:19: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 515| # 516| /* Extend the constant to extend_mode of the other operand if necessary. */ # 517|-> if (iv0->extend == IV_UNKNOWN_EXTEND # 518| && iv0->mode == iv0->extend_mode # 519| && iv0->step == const0_rtx Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:589:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 587| return false; # 588| # 589|-> if (iv->extend == IV_UNKNOWN_EXTEND) # 590| { # 591| iv->base = simplify_gen_binary (MULT, mode, iv->base, mby); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:614:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 612| return false; # 613| # 614|-> if (iv->extend == IV_UNKNOWN_EXTEND) # 615| { # 616| iv->base = simplify_gen_binary (ASHIFT, mode, iv->base, mby); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:2261:7: warning[deadcode.DeadStores]: Value stored to 'niter' is never read # 2259| return nmax; # 2260| inc = INTVAL (XEXP (niter, 1)); # 2261|-> niter = XEXP (niter, 0); # 2262| } # 2263| else Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:2425:7: warning[deadcode.DeadStores]: Value stored to 'step_val' is never read # 2423| case. */ # 2424| step_is_pow2 = false; # 2425|-> step_val = 0; # 2426| } # 2427| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lra-assigns.cc:582:4: warning[deadcode.DeadStores]: Value stored to 'nregs_diff' is never read # 580| = hard_regno_nregs (conflict_hr, biggest_conflict_mode); # 581| # 582|-> nregs_diff # 583| = (biggest_conflict_nregs # 584| - hard_regno_nregs (conflict_hr, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lra-assigns.cc:1234:6: warning[deadcode.DeadStores]: Value stored to 'nregs_diff' is never read # 1232| biggest_nregs = hard_regno_nregs (conflict_hard_regno, # 1233| biggest_mode); # 1234|-> nregs_diff # 1235| = (biggest_nregs # 1236| - hard_regno_nregs (conflict_hard_regno, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lra-lives.cc:1500:8: warning[deadcode.DeadStores]: Value stored to 'res' during its initialization is never read # 1498| happen later). */ # 1499| lra_clear_live_ranges (); # 1500|-> bool res = lra_create_live_ranges_1 (all_p, false); # 1501| lra_assert (! res); # 1502| } Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/lto-cgraph.cc: scope_hint: In function ‘void input_offload_tables(bool)’ gcc-14.0.1-20240411/gcc/lto-cgraph.cc:1976:35: warning[-Wformat-diag]: unquoted identifier or keyword ‘GCC_OFFLOAD_OMP_REQUIRES_FILE’ in format # 1976 | fatal_error (input_location, "GCC_OFFLOAD_OMP_REQUIRES_FILE unset"); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1974| char *omp_requires_file = getenv ("GCC_OFFLOAD_OMP_REQUIRES_FILE"); # 1975| if (omp_requires_file == NULL || omp_requires_file[0] == '\0') # 1976|-> fatal_error (input_location, "GCC_OFFLOAD_OMP_REQUIRES_FILE unset"); # 1977| FILE *f = fopen (omp_requires_file, "wb"); # 1978| if (!f) Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/lto-cgraph.cc:1979:47: warning[-Wformat-diag]: unquoted identifier or keyword ‘omp_requires’ in format # 1979 | fatal_error (input_location, "Cannot open omp_requires file %qs", # | ^~~~~~~~~~~~ # 1977| FILE *f = fopen (omp_requires_file, "wb"); # 1978| if (!f) # 1979|-> fatal_error (input_location, "Cannot open omp_requires file %qs", # 1980| omp_requires_file); # 1981| uint32_t req_mask = omp_requires_mask; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto-streamer-in.cc:1642:33: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 1640| if (TREE_CODE (node->decl) == FUNCTION_DECL) # 1641| { # 1642|-> lto_input_block ib_cfg (data + cfg_offset, header->cfg_size, # 1643| file_data); # 1644| input_function (fn_decl, data_in, &ib_main, &ib_cfg, Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/lto-wrapper.cc: scope_hint: In function ‘void print_lto_docs_link()’ gcc-14.0.1-20240411/gcc/lto-wrapper.cc:1373:10: warning[-Wformat-security]: format not a string literal and no format arguments # 1373 | inform (UNKNOWN_LOCATION, pp_formatted_text (&pp)); # | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1371| pp_end_url (&pp); # 1372| pp_string (&pp, " for more information"); # 1373|-> inform (UNKNOWN_LOCATION, pp_formatted_text (&pp)); # 1374| } # 1375| Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/lto-wrapper.cc: scope_hint: In function ‘void run_gcc(unsigned int, char**)’ gcc-14.0.1-20240411/gcc/lto-wrapper.cc:1975:23: warning[-Wformat-security]: format not a string literal and no format arguments # 1975 | warning (0, jinfo.error_msg.c_str ()); # | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 1973| if (jobserver_requested && !jinfo.is_active) # 1974| { # 1975|-> warning (0, jinfo.error_msg.c_str ()); # 1976| print_lto_docs_link (); # 1977| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto/lto-common.cc:480:9: warning[deadcode.DeadStores]: Value stored to 'existed_p' during its initialization is never read # 478| Update canonical type hash cache accordingly. */ # 479| num_canonical_type_hash_entries++; # 480|-> bool existed_p = canonical_type_hash_cache->put (prevail, hash); # 481| gcc_checking_assert (!existed_p); # 482| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto/lto-common.cc:1928:9: warning[deadcode.DeadStores]: Value stored to 'first' during its initialization is never read # 1926| by means of identifier and string sharing for example. # 1927| ??? Maybe we should avoid streaming those as SCCs. */ # 1928|-> tree first = streamer_tree_cache_get_tree (data_in->reader_cache, # 1929| from); # 1930| /* Identifier and integers are shared specially, they should never Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto/lto-common.cc:3047:26: warning[core.NullDereference]: Access to field 'len' results in a dereference of a null pointer (loaded from variable 'max_scc') # 3045| } # 3046| fprintf (stderr, "[%s] tree SCC max chain length %u (size %u)\n", # 3047|-> pfx, max_length, max_scc->len); # 3048| fprintf (stderr, "[%s] Compared %lu SCCs, %lu collisions (%f)\n", pfx, # 3049| num_scc_compares, num_scc_compare_collisions, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto/lto-dump.cc:158:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'e' # 156| # 157| cgraph_node *cnode; # 158|-> FOR_EACH_FUNCTION (cnode) # 159| { # 160| if (cnode->definition && !cnode->alias) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto/lto-dump.cc:194:3: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'e' # 192| # 193| varpool_node *vnode; # 194|-> FOR_EACH_VARIABLE (vnode) # 195| { # 196| symbol_entry *e = new variable_entry (vnode); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/loop-iv.cc:53: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:490: included_from: Included from here. gcc-14.0.1-20240411/gcc/machmode.h:437:60: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 435| scalar_int_mode (from_int m) : m_mode (machine_mode (m)) {} # 436| # 437|-> ALWAYS_INLINE CONSTEXPR operator machine_mode () const { return m_mode; } # 438| # 439| static bool includes_p (machine_mode); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/modulo-sched.cc:1571:7: warning[deadcode.DeadStores]: Value stored to 'latch_edge' is never read # 1569| get_ebb_head_tail (loop->header, loop->header, &head, &tail); # 1570| # 1571|-> latch_edge = loop_latch_edge (loop); # 1572| gcc_assert (single_exit (loop)); # 1573| trip_count = get_estimated_loop_iterations_int (loop); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/modulo-sched.cc:1584:27: warning[core.CallAndMessage]: Called C++ object pointer is null # 1582| fprintf (dump_file, "SMS loop-count "); # 1583| fprintf (dump_file, "%" PRId64, # 1584|-> (int64_t) bb->count.to_gcov_type ()); # 1585| fprintf (dump_file, "\n"); # 1586| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/modulo-sched.cc:2177:14: warning[deadcode.DeadStores]: Value stored to 'insn' during its initialization is never read # 2175| int u = nodes_order[i]; # 2176| ddg_node_ptr u_node = &ps->g->nodes[u]; # 2177|-> rtx_insn *insn = u_node->insn; # 2178| # 2179| gcc_checking_assert (NONDEBUG_INSN_P (insn)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:713:6: warning[deadcode.DeadStores]: Value stored to 'n1last' is never read # 711| t4 = fold_binary (MINUS_EXPR, itype, n2cur, t4); # 712| new_last = fold_binary (MINUS_EXPR, itype, t, ostep); # 713|-> n1last = t3; # 714| n2last = t4; # 715| if (flag_checking) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:714:6: warning[deadcode.DeadStores]: Value stored to 'n2last' is never read # 712| new_last = fold_binary (MINUS_EXPR, itype, t, ostep); # 713| n1last = t3; # 714|-> n2last = t4; # 715| if (flag_checking) # 716| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:725:6: warning[deadcode.DeadStores]: Value stored to 'n1last' is never read # 723| { # 724| new_last = t; # 725|-> n1last = n1cur; # 726| n2last = n2cur; # 727| if (flag_checking) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:726:6: warning[deadcode.DeadStores]: Value stored to 'n2last' is never read # 724| new_last = t; # 725| n1last = n1cur; # 726|-> n2last = n2cur; # 727| if (flag_checking) # 728| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:1083:21: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value # 1081| } # 1082| props = props + name_len + 1; # 1083|-> while (*props != '\0') # 1084| { # 1085| if (matches && strcmp (props, prop) == 0) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:2027:27: warning[core.NullDereference]: Dereference of null pointer # 2025| of the selector matters too. */ # 2026| for (ts1 = ctx1; ts1; ts1 = TREE_CHAIN (ts1)) # 2027|-> if (OMP_TS_CODE (ts1) == OMP_TS_CODE (ts2)) # 2028| { # 2029| int r = 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:2452:10: warning[core.NullDereference]: Access to field 'variant' results in a dereference of a null pointer (loaded from variable 'varentry2') # 2450| } # 2451| } # 2452|-> return varentry2->variant->decl; # 2453| } # 2454| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:2579:4: warning[core.CallAndMessage]: Called C++ object pointer is null # 2577| varentry.ctx = ctx; # 2578| varentry.matches = !defer[i]; # 2579|-> entry.variants->quick_push (varentry); # 2580| } # 2581| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:3078:40: warning[core.NullDereference]: Dereference of null pointer # 3076| tree c_diag_p; # 3077| /* Matching level of parallelism? */ # 3078|-> if (OMP_CLAUSE_CODE (c_level) != OMP_CLAUSE_CODE (c_level_p)) # 3079| { # 3080| c_diag = c_level; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:3578:30: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 3576| omp_parse_access_methods (addr_tokens, &expr); # 3577| # 3578|-> addr_tokens.safe_push (new omp_addr_token (kind, am_expr)); # 3579| # 3580| *expr0 = expr; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-general.cc:3723:19: warning[deadcode.DeadStores]: Value stored to 'pfx' during its initialization is never read # 3721| for (auto e : addr_tokens) # 3722| { # 3723|-> const char *pfx = ""; # 3724| # 3725| fputs (sep, stderr); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-oacc-neuter-broadcast.cc:445:20: warning[core.NullDereference]: Access to field 'mask' results in a dereference of a null pointer (loaded from variable 'par') # 443| unsigned mask = (dim >= 0) ? GOMP_DIM_MASK (dim) : 0; # 444| # 445|-> gcc_assert (par->mask == mask); # 446| par->join_block = block; # 447| par->join_stmt = stmt; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-oacc-neuter-broadcast.cc:1800:13: warning[deadcode.DeadStores]: Value stored to 'it' during its initialization is never read # 1798| # 1799| /* These are supposed to have been 'delete'd by 'neuter_worker_single'. */ # 1800|-> for (auto it : prop_set) # 1801| gcc_checking_assert (!it); # 1802| prop_set.release (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-simd-clone.cc:809:33: warning[core.NullDereference]: Dereference of null pointer # 807| if (node->definition) # 808| sc->args[i].simd_array # 809|-> = create_tmp_simd_array (IDENTIFIER_POINTER (DECL_NAME (parm)), # 810| TREE_TYPE (parm_type), # 811| sc->simdlen); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-simd-clone.cc:816:8: warning[core.NullDereference]: Dereference of null pointer # 814| case SIMD_CLONE_ARG_TYPE_LINEAR_VAL_VARIABLE_STEP: # 815| case SIMD_CLONE_ARG_TYPE_VECTOR: # 816|-> if (INTEGRAL_TYPE_P (parm_type) || POINTER_TYPE_P (parm_type)) # 817| veclen = sc->vecsize_int; # 818| else Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/omp-simd-clone.cc:908:33: warning[core.NullDereference]: Dereference of null pointer # 906| { # 907| if (new_reversed) # 908|-> TREE_CHAIN (new_arg_types) = void_list_node; # 909| else # 910| new_reversed = void_list_node; Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/opt-suggestions.cc:178: error[uninitvar]: Uninitialized variable: *option # 176| if (sanitizer_opts[j].flag == ~0U && i == OPT_fsanitize_) # 177| { # 178|-> optb = *option; # 179| optb.opt_text = opt_text = "-fno-sanitize="; # 180| optb.cl_reject_negative = true; Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/opts.cc:120: error[arrayIndexOutOfBounds]: Array 'debug_type_masks[5]' accessed at index 5, which is out of bounds. # 118| for (int i = DINFO_TYPE_NONE; i <= DINFO_TYPE_MAX; i++) # 119| { # 120|-> df_mask = debug_type_masks[i]; # 121| if (w_symbols & df_mask) # 122| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/opts.cc:2240:10: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'p') # 2238| enum opt_code code = (enum opt_code) scode; # 2239| # 2240|-> while (*p != 0) # 2241| { # 2242| size_t len, i; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/opts.cc:2546:10: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'a') # 2544| word = {optimizers|target|warnings|undocumented| # 2545| params|common|<language>} */ # 2546|-> while (*a != 0) # 2547| { # 2548| static const struct Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/postreload.cc:526:10: warning[core.UndefinedBinaryOperatorResult]: The left operand of '&' is a garbage value # 524| enum reg_class rclass = NO_REGS; # 525| # 526|-> if (! TEST_HARD_REG_BIT (equiv_regs[i], regno)) # 527| continue; # 528| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/postreload.cc:558:28: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 556| alternative yet and the operand being replaced is not # 557| a cheap CONST_INT. */ # 558|-> if (op_alt_regno[i][j] == -1 # 559| && TEST_BIT (preferred, j) # 560| && reg_fits_class_p (testreg, rclass, 0, mode) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/postreload.cc:630:30: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 628| { # 629| machine_mode mode = recog_data.operand_mode[i]; # 630|-> if (op_alt_regno[i][j] == -1) # 631| continue; # 632| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/postreload.cc:1213:47: warning[core.NullDereference]: Access to field 'insn' results in a dereference of a null pointer (loaded from variable 'lowest_ruid') # 1211| } # 1212| # 1213|-> fixup_debug_insns (reg, reg_sum, insn, lowest_ruid->insn); # 1214| # 1215| /* Delete the reg-reg addition. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-switch-conversion.cc:27: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:503: included_from: Included from here. gcc-14.0.1-20240411/gcc/dumpfile.h:24: included_from: Included from here. gcc-14.0.1-20240411/gcc/profile-count.h:102:32: warning[core.DivideZero]: Division by zero # 100| && c < ((uint64_t)1 << 31)) # 101| { # 102|-> *res = (a * b + (c / 2)) / c; # 103| return true; # 104| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cfg.cc:51: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:503: included_from: Included from here. gcc-14.0.1-20240411/gcc/dumpfile.h:24: included_from: Included from here. gcc-14.0.1-20240411/gcc/profile-count.h:438:21: warning[core.DivideZero]: Division by zero # 436| { # 437| gcc_checking_assert (other.m_val); # 438|-> ret.m_val = MIN (RDIV ((uint64_t)m_val * max_probability, # 439| other.m_val), # 440| max_probability); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/read-rtl-function.cc:565:48: warning[core.NullDereference]: Dereference of null pointer # 563| require_char_ws ('('); # 564| require_word_ws ("DECL_RTL"); # 565|-> DECL_WRTL_CHECK (t_param)->decl_with_rtl.rtl = parse_rtx (); # 566| require_char_ws (')'); # 567| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/read-rtl.cc:519:14: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 517| if (v->number == iterator->current_value->number) # 518| { # 519|-> if (res && strcmp (v->string, res->string) != 0) # 520| { # 521| error_at (loc, "ambiguous attribute '%s'; could be" Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:1530: error[arrayIndexOutOfBounds]: Array 'r->sig[3]' accessed at index 3, which is out of bounds. # 1528| { # 1529| int j = SIGSZ - words + i; # 1530|-> val[i] = (j < 0) ? 0 : r->sig[j]; # 1531| } # 1532| #else Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:4038: error[arrayIndexOutOfBounds]: Array 'u.sig[3]' accessed at index 3, which is out of bounds. # 4036| image1 = u.sig[1]; # 4037| image2 = u.sig[2]; # 4038|-> image3 |= u.sig[3] & 0xffff; # 4039| } # 4040| else Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:4080: error[arrayIndexOutOfBounds]: Array 'u.sig[3]' accessed at index 3, which is out of bounds. # 4078| image1 = u.sig[1]; # 4079| image2 = u.sig[2]; # 4080|-> image3 |= u.sig[3] & 0xffff; # 4081| } # 4082| else Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:4158: error[arrayIndexOutOfBounds]: Array 'r->sig[3]' accessed at index 3, which is out of bounds. # 4156| r->sig[1] = image1; # 4157| r->sig[2] = image2; # 4158|-> r->sig[3] = image3; # 4159| } # 4160| else Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:4184: error[arrayIndexOutOfBounds]: Array 'r->sig[3]' accessed at index 3, which is out of bounds. # 4182| r->sig[1] = image1; # 4183| r->sig[2] = image2; # 4184|-> r->sig[3] = image3; # 4185| } # 4186| else Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/real.cc:4210: error[arrayIndexOutOfBounds]: Array 'r->sig[3]' accessed at index 3, which is out of bounds. # 4208| r->sig[1] = image1; # 4209| r->sig[2] = image2; # 4210|-> r->sig[3] = image3; # 4211| } # 4212| else Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/gcc/ree.cc:698: error[returnDanglingLifetime]: Returning pointer that will be invalid when returning. # 696| } # 697| # 698|-> return sub_rtx; # 699| } # 700| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ree.cc:877:32: warning[core.NullDereference]: Dereference of null pointer # 875| # 876| for (df_link *use = uses; use; use = use->next) # 877|-> if (paradoxical_subreg_p (GET_MODE (*DF_REF_LOC (use->ref)), # 878| GET_MODE (SET_DEST (*dest_sub_rtx))) # 879| && !DEBUG_INSN_P (DF_REF_INSN (use->ref))) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ree.cc:966:29: warning[core.NullDereference]: Dereference of null pointer # 964| rtx dest2 = SET_DEST (*dest_sub_rtx2); # 965| for (use = uses; use; use = use->next) # 966|-> if (paradoxical_subreg_p (GET_MODE (*DF_REF_LOC (use->ref)), # 967| GET_MODE (dest2)) # 968| && !DEBUG_INSN_P (DF_REF_INSN (use->ref))) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/regrename.cc:955:6: warning[deadcode.DeadStores]: Value stored to 'printed' is never read # 953| "merging blocks for edge %d -> %d\n", # 954| e->src->index, e->dest->index); # 955|-> printed = true; # 956| fprintf (dump_file, # 957| " merging chains %d (->%d) and %d (->%d) [%s]\n", Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/regrename.cc:1025:21: warning[core.NullDereference]: Access to field 'loc' results in a dereference of a null pointer (loaded from field 'first') # 1023| return false; # 1024| # 1025|-> mode = GET_MODE (*head->first->loc); # 1026| head->renamed = 1; # 1027| head->regno = reg; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/regrename.cc:1590:28: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 1588| int i; # 1589| for (i = 0; i < recog_data.n_dups; i++) # 1590|-> *recog_data.dup_loc[i] = old_dups[i]; # 1591| for (i = 0; i < n_ops; i++) # 1592| *recog_data.operand_loc[i] = old_operands[i]; Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/gcc/regs.h:263: error[arrayIndexOutOfBounds]: Array 'default_target_regs.x_hard_regno_nregs[16][43]' accessed at index default_target_regs.x_hard_regno_nregs[4294967295][*], which is out of bounds. # 261| hard_regno_nregs (unsigned int regno, machine_mode mode) # 262| { # 263|-> return this_target_regs->x_hard_regno_nregs[regno][mode]; # 264| } # 265| Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/gcc/regs.h:286: error[shiftTooManyBits]: Shifting 64-bit value by 4294967296 bits is undefined behaviour # 284| end_regno = end_hard_regno (mode, regno); # 285| do # 286|-> SET_HARD_REG_BIT (*regs, regno); # 287| while (++regno < end_regno); # 288| } Error: COMPILER_WARNING (CWE-457): gcc-14.0.1-20240411/gcc/reload1.cc: scope_hint: In function ‘void elimination_costs_in_insn(rtx_insn*)’ gcc-14.0.1-20240411/gcc/reload1.cc:3653:28: warning[-Wmaybe-uninitialized]: ‘orig_dup[0]’ may be used uninitialized # 3653 | *recog_data.dup_loc[i] = orig_dup[i]; # | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/reload1.cc:3529:7: note: ‘orig_dup[0]’ was declared here # 3529 | rtx orig_dup[MAX_RECOG_OPERANDS]; # | ^~~~~~~~ # 3651| *recog_data.operand_loc[i] = orig_operand[i]; # 3652| for (i = 0; i < n_dups; i++) # 3653|-> *recog_data.dup_loc[i] = orig_dup[i]; # 3654| # 3655| /* Update all elimination pairs to reflect the status after the current Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/reorg.cc:1365:10: warning[core.CallAndMessage]: Called C++ object pointer is null # 1363| update_block (merged_insns[i].first, thread); # 1364| rtx_insn *new_rtx = delete_from_delay_slot (merged_insns[i].first); # 1365|-> if (thread->deleted ()) # 1366| thread = new_rtx; # 1367| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/auto-inc-dec.cc:26: included_from: Included from here. gcc-14.0.1-20240411/gcc/rtl.h:1455:3: warning[core.uninitialized.UndefReturn]: Returning null reference # 1453| inline int& INSN_UID (rtx insn) # 1454| { # 1455|-> return RTL_INSN_CHAIN_FLAG_CHECK ("INSN_UID", # 1456| (insn))->u2.insn_uid; # 1457| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/read-rtl-function.cc:27: included_from: Included from here. gcc-14.0.1-20240411/gcc/rtl.h:1474:3: warning[core.uninitialized.UndefReturn]: Returning null reference # 1472| inline rtx& SET_PREV_INSN (rtx_insn *insn) # 1473| { # 1474|-> return XEXP (insn, 0); # 1475| } # 1476| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lra-assigns.cc:82: included_from: Included from here. gcc-14.0.1-20240411/gcc/rtl.h:1495:3: warning[core.uninitialized.UndefReturn]: Returning null reference # 1493| inline basic_block& BLOCK_FOR_INSN (rtx insn) # 1494| { # 1495|-> return XBBDEF (insn, 2); # 1496| } # 1497| Error: CPPCHECK_WARNING (CWE-570): gcc-14.0.1-20240411/gcc/sbitmap.cc:160: error[comparePointers]: Subtracting pointers that point to different objects # 158| /* Based on DEFAULT_ALIGNMENT computation in obstack.c. */ # 159| struct { char x; SBITMAP_ELT_TYPE y; } align; # 160|-> int alignment = (char *) & align.y - & align.x; # 161| vector_bytes = (vector_bytes + alignment - 1) & ~ (alignment - 1); # 162| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/sbitmap.cc:266:48: warning[core.BitwiseShift]: Left shift overflows the capacity of 'unsigned long' # 264| # 265| /* Now handle residuals in the last word. */ # 266|-> SBITMAP_ELT_TYPE mask = ((SBITMAP_ELT_TYPE)1 << count) - 1; # 267| bmap->elms[start_word] &= ~mask; # 268| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/sbitmap.cc:325:48: warning[core.BitwiseShift]: Left shift overflows the capacity of 'unsigned long' # 323| # 324| /* Now handle residuals in the last word. */ # 325|-> SBITMAP_ELT_TYPE mask = ((SBITMAP_ELT_TYPE)1 << count) - 1; # 326| bmap->elms[start_word] |= mask; # 327| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/sched-ebb.cc:170:12: warning[deadcode.DeadStores]: Value stored to 'x' during its initialization is never read # 168| # 169| { # 170|-> rtx_insn *x = NEXT_INSN (insn); # 171| if (e) # 172| gcc_checking_assert (NOTE_P (x) || LABEL_P (x)); Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/sel-sched-ir.h:1077: error[ctunullpointer]: Null pointer dereference: loop # 1075| struct loop_exit *exit; # 1076| # 1077|-> gcc_assert (loop->latch != EXIT_BLOCK_PTR_FOR_FN (cfun) # 1078| && current_loops->state & LOOPS_HAVE_RECORDED_EXITS); # 1079| Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/gcc/sel-sched-ir.h:1077: warning[nullPointer]: Possible null pointer dereference: loop # 1075| struct loop_exit *exit; # 1076| # 1077|-> gcc_assert (loop->latch != EXIT_BLOCK_PTR_FOR_FN (cfun) # 1078| && current_loops->state & LOOPS_HAVE_RECORDED_EXITS); # 1079| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/shrink-wrap.cc:823:7: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from variable 'pro') # 821| if (dump_file) # 822| fprintf (dump_file, "Avoiding non-duplicatable blocks, PRO is now %d\n", # 823|-> pro->index); # 824| # 825| /* If we can move PRO back without having to duplicate more blocks, do so. Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/shrink-wrap.cc:891:7: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from variable 'pro') # 889| if (dump_file) # 890| fprintf (dump_file, "Bumping back to anticipatable blocks, PRO is now %d\n", # 891|-> pro->index); # 892| # 893| if (pro == entry) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/spellcheck.cc:109:52: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 107| cost = BASE_COST; # 108| edit_distance_t deletion = v_next[j] + BASE_COST; # 109|-> edit_distance_t insertion = v_one_ago[j + 1] + BASE_COST; # 110| edit_distance_t substitution = v_one_ago[j] + cost; # 111| edit_distance_t cheapest = MIN (deletion, insertion); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/stor-layout.cc:213:7: warning[core.CallAndMessage]: Called C++ object pointer is null # 211| param_type_list = tree_cons (NULL_TREE, param_type, param_type_list); # 212| param_decl_list = chainon (param_decl, param_decl_list); # 213|-> args->quick_push (ref); # 214| } # 215| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/stor-layout.cc:1268:19: warning[core.DivideZero]: Division by zero # 1266| unsigned HOST_WIDE_INT offset = byte_offset * BITS_PER_UNIT + bit_offset; # 1267| # 1268|-> offset = offset % align; # 1269| return ((offset + size + align - 1) / align # 1270| > tree_to_uhwi (TYPE_SIZE (type)) / align); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/store-motion.cc:678:12: warning[deadcode.DeadStores]: Although the value stored to 'tmp' is used in the enclosing expression, the value is never actually read from 'tmp' # 676| LAST_AVAIL_CHECK_FAILURE (ptr) = NULL_RTX; # 677| if (!ptr->antic_stores.is_empty () # 678|-> && (tmp = ptr->antic_stores.last ()) == NULL) # 679| ptr->antic_stores.pop (); # 680| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ipa-profile.cc:56: included_from: Included from here. gcc-14.0.1-20240411/gcc/symbol-summary.h:701:35: warning[core.CallAndMessage]: Called C++ object pointer is null # 699| { # 700| bool existed; # 701|-> T **v = &m_map.get_or_insert (edge->get_uid (), &existed); # 702| if (!existed) # 703| *v = this->allocate_new (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/symtab-thunks.cc:462:12: warning[deadcode.DeadStores]: Although the value stored to 'then_bb' is used in the enclosing expression, the value is never actually read from 'then_bb' # 460| (BB_FREQ_MAX).guessed_local (); # 461| # 462|-> bb = then_bb = else_bb = return_bb # 463| = init_lowered_empty_function (thunk_fndecl, true, cfg_count); # 464| Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/text-art/style.cc: scope_hint: In member function ‘void text_art::style::color::print_sgr(pretty_printer*, bool, bool&) const’ gcc-14.0.1-20240411/gcc/text-art/style.cc:151:25: warning[-Wformat-diag]: spurious leading punctuation sequence ‘;’ in format # 151 | pp_printf (pp, ";5;%i", (int)u.m_8bit); # | ^ # 149| else # 150| pp_string (pp, "48"); # 151|-> pp_printf (pp, ";5;%i", (int)u.m_8bit); # 152| } # 153| break; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/text-art/style.cc:161:25: warning[-Wformat-diag]: spurious leading punctuation sequence ‘;’ in format # 161 | pp_printf (pp, ";2;%i;%i;%i", # | ^ # 159| else # 160| pp_string (pp, "48"); # 161|-> pp_printf (pp, ";2;%i;%i;%i", # 162| (int)u.m_24bit.r, # 163| (int)u.m_24bit.g, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tracer.cc:392:25: warning[core.DivideZero]: Division by zero # 390| if (dump_file) # 391| fprintf (dump_file, "Duplicated %i insns (%i%%)\n", nduplicated, # 392|-> nduplicated * 100 / ninsns); # 393| # 394| free_original_copy_tables (); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:164:11: warning[core.NullDereference]: Dereference of null pointer # 162| tree real, imag; # 163| # 164|-> switch (TREE_CODE (t)) # 165| { # 166| case SSA_NAME: Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:277:7: warning[core.NullDereference]: Dereference of null pointer # 275| case ROUND_DIV_EXPR: # 276| case RDIV_EXPR: # 277|-> if (TREE_CODE (TREE_TYPE (op0)) == COMPLEX_TYPE # 278| || TREE_CODE (TREE_TYPE (op1)) == COMPLEX_TYPE) # 279| saw_a_complex_op = true; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:278:10: warning[core.NullDereference]: Dereference of null pointer # 276| case RDIV_EXPR: # 277| if (TREE_CODE (TREE_TYPE (op0)) == COMPLEX_TYPE # 278|-> || TREE_CODE (TREE_TYPE (op1)) == COMPLEX_TYPE) # 279| saw_a_complex_op = true; # 280| break; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:284:7: warning[core.NullDereference]: Dereference of null pointer # 282| case NEGATE_EXPR: # 283| case CONJ_EXPR: # 284|-> if (TREE_CODE (TREE_TYPE (op0)) == COMPLEX_TYPE) # 285| saw_a_complex_op = true; # 286| break; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:294:7: warning[core.NullDereference]: Dereference of null pointer # 292| and we need to lower the statement to be able # 293| to fix things up. */ # 294|-> if (TREE_CODE (op0) == SSA_NAME # 295| && ssa_undefined_value_p (op0)) # 296| saw_a_complex_op = true; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:529:7: warning[core.NullDereference]: Dereference of null pointer # 527| = SSA_NAME_OCCURS_IN_ABNORMAL_PHI (ssa_name); # 528| if (SSA_NAME_IS_DEFAULT_DEF (ssa_name) # 529|-> && VAR_P (SSA_NAME_VAR (ssa_name))) # 530| { # 531| SSA_NAME_DEF_STMT (ret) = SSA_NAME_DEF_STMT (ssa_name); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-complex.cc:618:11: warning[core.NullDereference]: Dereference of null pointer # 616| bool gimple_p, bool phiarg_p = false) # 617| { # 618|-> switch (TREE_CODE (t)) # 619| { # 620| case COMPLEX_CST: Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-outof-ssa.cc:341:11: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 339| { # 340| x = expand_expr (src, NULL, src_mode, EXPAND_NORMAL); # 341|-> x = convert_modes (dest_mode, src_mode, x, unsignedp); # 342| } # 343| else if (src_mode == BLKmode) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-pretty-print.cc:4215:30: warning[core.NullDereference]: Dereference of null pointer # 4213| else if (TREE_CODE (t) == FUNCTION_DECL) # 4214| { # 4215|-> dump_generic_node (pp, TREE_TYPE (TREE_TYPE (t)), spc, flags, false); # 4216| pp_space (pp); # 4217| dump_decl_name (pp, t, flags); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-profile.cc:562:29: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from field 't') # 560| # 561| outcomes succs = conditional_succs (q); # 562|-> if (!bitmap_bit_p (marks, succs.t->index)) # 563| continue; # 564| if (!bitmap_bit_p (marks, succs.f->index)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-scalar-evolution.cc:935:16: warning[core.NullDereference]: Dereference of null pointer # 933| } # 934| # 935|-> else if (TREE_CODE (rhs1) == SSA_NAME) # 936| { # 937| /* Match an assignment under the form: Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-scalar-evolution.cc:1263:8: warning[core.NullDereference]: Dereference of null pointer # 1261| /* This case is under the form "rhs0 +- rhs1". */ # 1262| if (TREE_CODE (rhs0) == SSA_NAME # 1263|-> && (TREE_CODE (rhs1) != SSA_NAME || code == MINUS_EXPR)) # 1264| { # 1265| /* Match an assignment under the form: Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-scalar-evolution.cc:1485:10: warning[core.NullDereference]: Dereference of null pointer # 1483| { # 1484| tree res = var; # 1485|-> while (TREE_CODE (res) == SSA_NAME # 1486| /* We face not updated SSA form in multiple places and this walk # 1487| may end up in sibling loops so we have to guard it. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-scalar-evolution.cc:2826:9: warning[core.NullDereference]: Access to field 'nb_iterations' results in a dereference of a null pointer (loaded from variable 'loop') # 2824| /* Determine whether the number of iterations in loop has already # 2825| been computed. */ # 2826|-> res = loop->nb_iterations; # 2827| if (res) # 2828| return res; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-address.cc:245:17: warning[core.NullDereference]: Dereference of null pointer (loaded from field 'step_p') # 243| # 244| if (st) # 245|-> *templ->step_p = st; # 246| if (off) # 247| *templ->off_p = off; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-coalesce.cc:625:9: warning[deadcode.DeadStores]: Value stored to 'was_there' during its initialization is never read # 623| if (bz) # 624| { # 625|-> bool was_there = bitmap_clear_bit (bz, y); # 626| gcc_checking_assert (was_there); # 627| bitmap_set_bit (bz, x); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-coalesce.cc:1233:10: warning[core.NullDereference]: Dereference of null pointer # 1231| ssa_name_var_hash::hash (const_tree n) # 1232| { # 1233|-> return DECL_UID (SSA_NAME_VAR (n)); # 1234| } # 1235| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-coalesce.cc:1320:10: warning[core.NullDereference]: Dereference of null pointer # 1318| performed at -O0, so we can't actually require it. */ # 1319| const int cost # 1320|-> = (VAR_P (SSA_NAME_VAR (a)) || in_lto_p) # 1321| ? MUST_COALESCE_COST - 1 : MUST_COALESCE_COST; # 1322| add_coalesce (cl, SSA_NAME_VERSION (a), Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-coalesce.cc:1451:11: warning[deadcode.DeadStores]: Although the value stored to 'cost' is used in the enclosing expression, the value is never actually read from 'cost' # 1449| /* Now process the items in the coalesce list. */ # 1450| # 1451|-> while ((cost = pop_best_coalesce (cl, &x, &y)) != NO_BEST_COALESCE) # 1452| { # 1453| var1 = ssa_name (x); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-copy.cc:178:7: warning[core.NullDereference]: Dereference of null pointer # 176| # 177| print_generic_expr (file, var, dump_flags); # 178|-> if (TREE_CODE (var) != SSA_NAME) # 179| return; # 180| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-forwprop.cc:1995:10: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1993| if (tree_fits_uhwi_p (def_arg2[0]) # 1994| && tree_fits_uhwi_p (def_arg2[1]) # 1995|-> && tree_to_uhwi (def_arg2[0]) # 1996| + tree_to_uhwi (def_arg2[1]) == TYPE_PRECISION (rtype)) # 1997| rotcnt = def_arg2[0]; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-forwprop.cc:1998:12: warning[core.NullDereference]: Dereference of null pointer # 1996| + tree_to_uhwi (def_arg2[1]) == TYPE_PRECISION (rtype)) # 1997| rotcnt = def_arg2[0]; # 1998|-> else if (TREE_CODE (def_arg2[0]) != SSA_NAME # 1999| || TREE_CODE (def_arg2[1]) != SSA_NAME) # 2000| return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-live.cc:224:9: warning[core.NullDereference]: Dereference of null pointer # 222| || !SSA_NAME_IS_DEFAULT_DEF (ssa_name (tmp)) # 223| || (SSA_NAME_VAR (ssa_name (tmp)) # 224|-> && !VAR_P (SSA_NAME_VAR (ssa_name (tmp)))))) # 225| bitmap_set_bit (used, tmp); # 226| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-im.cc:948:24: warning[core.NullDereference]: Access to field 'max_loop' results in a dereference of a null pointer (loaded from variable 'lim_data') # 946| return; # 947| # 948|-> gcc_assert (level == lim_data->max_loop # 949| || flow_loop_nested_p (lim_data->max_loop, level)); # 950| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-im.cc:1696:10: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 1694| tree ref_type = TREE_TYPE (*mem); # 1695| tree tmp = build1 (ADDR_EXPR, ptr_type_node, # 1696|-> unshare_expr (mem_base)); # 1697| if (TYPE_ALIGN (ref_type) != ref_align) # 1698| ref_type = build_aligned_type (ref_type, ref_align); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-im.cc:3425:5: warning[core.NullDereference]: Access to field 'index' results in a dereference of a null pointer (loaded from variable 'last') # 3423| if (dump_enabled_p ()) # 3424| dump_printf (MSG_NOTE, "BB %d is always executed in loop %d\n", # 3425|-> last->index, loop->num); # 3426| SET_ALWAYS_EXECUTED_IN (last, loop); # 3427| if (last == loop->header) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-im.cc:3426:4: warning[core.NullDereference]: Access to field 'aux' results in a dereference of a null pointer (loaded from variable 'last') # 3424| dump_printf (MSG_NOTE, "BB %d is always executed in loop %d\n", # 3425| last->index, loop->num); # 3426|-> SET_ALWAYS_EXECUTED_IN (last, loop); # 3427| if (last == loop->header) # 3428| break; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-ivcanon.cc:1499:7: warning[deadcode.DeadStores]: Value stored to 'changed' is never read # 1497| do # 1498| { # 1499|-> changed = false; # 1500| bitmap loop_closed_ssa_invalidated = NULL; # 1501| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-loop-unswitch.cc:1092:7: warning[deadcode.DeadStores]: Value stored to 'changed' is never read # 1090| in the below recursion. See gcc.dg/loop-unswitch-16.c */ # 1091| add_predicate_to_path (predicate_path, predicate, true); # 1092|-> changed |= simplify_loop_version (loop, predicate_path, # 1093| ignored_edge_flag, handled); # 1094| tree_unswitch_single_loop (loop, loc, predicate_path, Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/gcc/tree-ssa-sccvn.cc: scope_hint: In function ‘void print_vn_reference_ops(FILE*, vec<vn_reference_op_struct>)’ gcc-14.0.1-20240411/gcc/tree-ssa-sccvn.cc:286:21: warning[-Wformat-security]: format not a string literal and no format arguments # 286 | fprintf (outfile, internal_fn_name ((internal_fn)vro->clique)); # | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 284| { # 285| if (!vro->op0) # 286|-> fprintf (outfile, internal_fn_name ((internal_fn)vro->clique)); # 287| else # 288| print_generic_expr (outfile, vro->op0); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-scopedtables.cc:638:14: warning[core.NullDereference]: Dereference of null pointer # 636| if ((CONVERT_EXPR_CODE_P (expr0->ops.unary.op) # 637| || expr0->ops.unary.op == NON_LVALUE_EXPR) # 638|-> && TYPE_UNSIGNED (expr0->type) != TYPE_UNSIGNED (expr1->type)) # 639| return false; # 640| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-threadedge.cc:1385:6: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1383| i = 0; # 1384| FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_ALL_USES) # 1385|-> SET_USE (use_p, copy[i++]); # 1386| } # 1387| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-threadupdate.cc:1480:27: warning[core.NullDereference]: Access to field 'src' results in a dereference of a null pointer (loaded from variable 'e2') # 1478| and thread this elsewhere, so just cancel the jump threading # 1479| request by clearing the AUX field now. */ # 1480|-> if (bb->loop_father != e2->src->loop_father # 1481| && (!loop_exit_edge_p (e2->src->loop_father, e2) # 1482| || flow_loop_nested_p (bb->loop_father, Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssa-threadupdate.cc:1864:19: warning[core.NullDereference]: Access to field 'dest' results in a dereference of a null pointer (loaded from variable 'e') # 1862| thread_block (header, false); # 1863| set_loop_copy (loop, NULL); # 1864|-> new_preheader = e->dest; # 1865| # 1866| /* Create the new latch block. This is always necessary, as the latch Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-ssanames.cc:159:3: warning[core.CallAndMessage]: Called C++ object pointer is null # 157| We use vec::quick_push here because we know that SSA_NAMES has at # 158| least 50 elements reserved in it. */ # 159|-> SSANAMES (fn)->quick_push (NULL_TREE); # 160| FREE_SSANAMES (fn) = NULL; # 161| FREE_SSANAMES_QUEUE (fn) = NULL; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-tailcall.cc:295:40: warning[core.NullDereference]: Dereference of null pointer # 293| if (gimple_assign_cast_p (stmt)) # 294| { # 295|-> if (TYPE_MODE (TREE_TYPE (dest)) != TYPE_MODE (TREE_TYPE (src_var))) # 296| return FAIL; # 297| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-tailcall.cc:367:33: warning[core.NullDereference]: Dereference of null pointer # 365| # 366| case NEGATE_EXPR: # 367|-> *m = build_minus_one_cst (TREE_TYPE (op0)); # 368| *ass_var = dest; # 369| return OK; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-tailcall.cc:373:40: warning[core.NullDereference]: Dereference of null pointer # 371| case MINUS_EXPR: # 372| if (*ass_var == op0) # 373|-> *a = fold_build1 (NEGATE_EXPR, TREE_TYPE (non_ass_var), non_ass_var); # 374| else # 375| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-tailcall.cc:943:10: warning[deadcode.DeadStores]: Although the value stored to 'orig_stmt' is used in the enclosing expression, the value is never actually read from 'orig_stmt' # 941| gimple *orig_stmt; # 942| # 943|-> stmt = orig_stmt = gsi_stmt (t->call_gsi); # 944| bb = gsi_bb (t->call_gsi); # 945| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:317:7: warning[core.CallAndMessage]: Called C++ object pointer is null # 315| constant_p = false; # 316| constructor_elt ce = {NULL_TREE, result}; # 317|-> v->quick_push (ce); # 318| } # 319| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:507:24: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value due to array index out of bounds # 505| for (i = 1; i < nunits; i++) # 506| { # 507|-> if (shiftcnts[i] != shiftcnts[0]) # 508| scalar_shift = false; # 509| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:511:36: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value due to array index out of bounds # 509| } # 510| # 511|-> if (scalar_shift && shiftcnts[0] == 0) # 512| return op0; # 513| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:651:12: warning[core.BitwiseShift]: Right operand is negative in right shift # 649| if (pre_shift != 0) # 650| { # 651|-> if ((d >> pre_shift) <= 1) # 652| { # 653| mode = -2; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:1424:4: warning[deadcode.DeadStores]: Value stored to 'idx' is never read # 1422| { # 1423| index &= elements - 1; # 1424|-> idx = build_int_cst (TREE_TYPE (idx), index); # 1425| } # 1426| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:1805:33: warning[core.NullDereference]: Dereference of null pointer # 1803| { # 1804| gimple *g = gimple_build_call (decl, 1, a); # 1805|-> tree lhs = make_ssa_name (TREE_TYPE (TREE_TYPE (decl))); # 1806| gimple_call_set_lhs (g, lhs); # 1807| gsi_insert_before (gsi, g, GSI_SAME_STMT); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:2064:5: warning[core.CallAndMessage]: Called C++ object pointer is null # 2062| if (!CONSTANT_CLASS_P (ce.value)) # 2063| constant_p = false; # 2064|-> v->quick_push (ce); # 2065| ce.value = gimplify_build1 (gsi, code2, cretd_type, a); # 2066| if (!CONSTANT_CLASS_P (ce.value)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vect-generic.cc:2242:11: warning[core.NullDereference]: Dereference of null pointer # 2240| could be a scalar variable or a constant. Transform # 2241| vector <op> {x,x,x,x} ==> vector <op> scalar. */ # 2242|-> if (VECTOR_INTEGER_TYPE_P (TREE_TYPE (rhs2))) # 2243| { # 2244| tree first; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vectorizer.cc:117:15: warning[deadcode.DeadStores]: Value stored to 'ks' during its initialization is never read # 115| fprintf (f, "<unknown> "); # 116| fprintf (f, "%d times ", count); # 117|-> const char *ks = "unknown"; # 118| switch (kind) # 119| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vectorizer.cc:176:15: warning[deadcode.DeadStores]: Value stored to 'ws' during its initialization is never read # 174| fprintf (f, "(misalign %d) ", misalign); # 175| fprintf (f, "costs %u ", cost); # 176|-> const char *ws = "unknown"; # 177| switch (where) # 178| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vectorizer.cc:310:19: warning[core.NullDereference]: Dereference of null pointer # 308| gcc_assert (TREE_CODE (arg) == SSA_NAME); # 309| simduid_to_vf *p = NULL, data; # 310|-> data.simduid = DECL_UID (SSA_NAME_VAR (arg)); # 311| /* Need to nullify loop safelen field since it's value is not # 312| valid after transformation. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/tree-vectorizer.cc:421:15: warning[core.NullDereference]: Dereference of null pointer # 419| imm_use_iterator use_iter; # 420| gimple *use_stmt; # 421|-> ns.simduid = DECL_UID (SSA_NAME_VAR (gimple_call_arg (stmt, 0))); # 422| FOR_EACH_IMM_USE_STMT (use_stmt, use_iter, lhs) # 423| if (!is_gimple_debug (use_stmt)) Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/analyzer/access-diagram.cc:29: included_from: Included from here. gcc-14.0.1-20240411/gcc/tree.h:4174:12: warning[core.NullDereference]: Array access (via field 'val') results in a null pointer dereference # 4172| { # 4173| if (VL_EXP_CLASS_P (node)) # 4174|-> return VL_EXP_OPERAND_LENGTH (node); # 4175| else # 4176| return TREE_CODE_LENGTH (TREE_CODE (node)); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/cp/cp-gimplify.cc:27: included_from: Included from here. gcc-14.0.1-20240411/gcc/cp/cp-tree.h:42: included_from: Included from here. gcc-14.0.1-20240411/gcc/c-family/c-common.h:26: included_from: Included from here. gcc-14.0.1-20240411/gcc/tree.h:4231:19: warning[core.NullDereference]: Dereference of null pointer # 4229| id_equal (const_tree id, const char *str) # 4230| { # 4231|-> return !strcmp (IDENTIFIER_POINTER (id), str); # 4232| } # 4233| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/ubsan.cc:655:21: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 653| DECL_IGNORED_P (type_decl) = 1; # 654| DECL_ARTIFICIAL (type_decl) = 1; # 655|-> TYPE_FIELDS (ret) = fields[0]; # 656| TYPE_NAME (ret) = type_decl; # 657| TYPE_STUB_DECL (ret) = type_decl; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/valtrack.cc:432:12: warning[deadcode.DeadStores]: Value stored to 'added' during its initialization is never read # 430| debug->global->used = BITMAP_ALLOC (NULL); # 431| # 432|-> bool added = bitmap_set_bit (debug->global->used, REGNO (reg)); # 433| gcc_checking_assert (added); # 434| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/valtrack.cc:733:46: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'uses') # 731| the debug use is not part of a larger expression, then it # 732| probably doesn't make sense to introduce a new debug temp. */ # 733|-> if (where == DEBUG_TEMP_AFTER_WITH_REG && !uses->next) # 734| { # 735| rtx_insn *next = DF_REF_INSN (uses->use); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/value-prof.cc:1252:8: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'val') # 1250| n->profile_id, # 1251| n->dump_name (), # 1252|-> (*val)->dump_name ()); # 1253| n->profile_id = (n->profile_id + 1) & 0x7fffffff; # 1254| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:44: included_from: Included from here. gcc-14.0.1-20240411/gcc/tree-vrp.h:23: included_from: Included from here. gcc-14.0.1-20240411/gcc/value-range.h:1343:7: warning[deadcode.DeadStores]: Value stored to 'res' during its initialization is never read # 1341| get_max_float (REAL_MODE_FORMAT (TYPE_MODE (type)), # 1342| buf, sizeof (buf), false); # 1343|-> int res = real_from_string (&r, buf); # 1344| gcc_checking_assert (!res); # 1345| return r; Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/lto-streamer-in.cc:25: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:498: included_from: Included from here. gcc-14.0.1-20240411/gcc/hash-table.h:248: included_from: Included from here. gcc-14.0.1-20240411/gcc/vec.h:761:3: warning[core.CallAndMessage]: Called C++ object pointer is null # 759| gcc_checking_assert (len >= oldlen); # 760| vec_safe_reserve (v, len - oldlen, exact PASS_MEM_STAT); # 761|-> v->quick_grow (len); # 762| } # 763| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c/gimple-parser.cc:22: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:498: included_from: Included from here. gcc-14.0.1-20240411/gcc/hash-table.h:248: included_from: Included from here. gcc-14.0.1-20240411/gcc/vec.h:774:3: warning[core.CallAndMessage]: Called C++ object pointer is null # 772| gcc_checking_assert (len >= oldlen); # 773| vec_safe_reserve (v, len - oldlen, exact PASS_MEM_STAT); # 774|-> v->quick_grow_cleared (len); # 775| } # 776| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/vec.h:835:10: warning[core.CallAndMessage]: Called C++ object pointer is null # 833| { # 834| vec_safe_reserve (v, 1, false PASS_MEM_STAT); # 835|-> return v->quick_push (obj); # 836| } # 837| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/vec.h:847:3: warning[core.CallAndMessage]: Called C++ object pointer is null # 845| { # 846| vec_safe_reserve (v, 1, false PASS_MEM_STAT); # 847|-> v->quick_insert (ix, obj); # 848| } # 849| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/vec.h:881:7: warning[core.CallAndMessage]: Called C++ object pointer is null # 879| vec_safe_reserve_exact (dst, vec_safe_length (dst) + src_len # 880| PASS_MEM_STAT); # 881|-> dst->splice (*src); # 882| } # 883| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/wide-int-print.cc:144:5: warning[deadcode.DeadStores]: Value stored to 'buf' is never read # 142| { # 143| if (val == 0) # 144|-> buf += sprintf (buf, "0x0"); # 145| else # 146| { Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/wide-int.cc:160:16: warning[deadcode.DeadStores]: Value stored to 'words' during its initialization is never read # 158| unsigned int precision = buffer_len * BITS_PER_UNIT; # 159| wide_int result = wide_int::create (precision); # 160|-> unsigned int words = buffer_len / UNITS_PER_WORD; # 161| # 162| /* We have to clear all the bits ourself, as we merely or in values Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/gimple-ssa-warn-restrict.cc:24: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:472: included_from: Included from here. gcc-14.0.1-20240411/gcc/wide-int.h:877:5: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 875| { # 876| if (is_sign_extended) # 877|-> return this->get_val ()[0]; # 878| else # 879| return to_shwi (this->get_precision ()); Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/c-family/c-pretty-print.cc:23: included_from: Included from here. gcc-14.0.1-20240411/gcc/coretypes.h:472: included_from: Included from here. gcc-14.0.1-20240411/gcc/wide-int.h:1202:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value # 1200| { # 1201| u.valp = XNEWVEC (HOST_WIDE_INT, CEIL (precision, HOST_BITS_PER_WIDE_INT)); # 1202|-> memcpy (u.valp, x.u.valp, len * sizeof (HOST_WIDE_INT)); # 1203| } # 1204| } Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/wide-int.h:1266:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 1264| wide_int_storage::get_len () const # 1265| { # 1266|-> return len; # 1267| } # 1268| Error: CLANG_WARNING: gcc-14.0.1-20240411/gcc/wide-int.h:1421:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 1419| fixed_wide_int_storage <N>::get_len () const # 1420| { # 1421|-> return len; # 1422| } # 1423| Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/dwarf.c:1516:7: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 1514| memset (&key, 0, sizeof key); # 1515| key.code = code; # 1516|-> p = bsearch (&key, abbrevs->abbrevs, abbrevs->num_abbrevs, # 1517| sizeof (struct abbrev), abbrev_compare); # 1518| if (p == NULL) Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:4666:16: warning[core.BitwiseShift]: Right operand is negative in left shift # 4664| bits -= literal_decode.table_bits; # 4665| literal_state = ((val >> bits) # 4666|-> & ((1U << literal_decode.table_bits) - 1)); # 4667| # 4668| if (!elf_fetch_bits_backward (&pback, pin, &val, &bits)) Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:4701:21: warning[core.NullDereference]: Access to field 'basebits' results in a dereference of a null pointer (loaded from variable 'pt') # 4699| # 4700| pt = &offset_decode.table[offset_state]; # 4701|-> offset_basebits = pt->basebits; # 4702| offset_baseline = pt->baseline; # 4703| offset_bits = pt->bits; Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:4715:18: warning[core.BitwiseShift]: Right shift overflows the capacity of 'uint64_t' # 4713| return 0; # 4714| bits -= 16; # 4715|-> add = (val >> bits) & ((1U << 16) - 1); # 4716| need -= 16; # 4717| add <<= need; Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:5934:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5932| poffset, &range, &code)) # 5933| { # 5934|-> next_dist = dist[3]; # 5935| dist[3] = dist[2]; # 5936| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:5939:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5937| else # 5938| { # 5939|-> next_dist = dist[2]; # 5940| } # 5941| dist[2] = dist[1]; Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:5945:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5943| else # 5944| { # 5945|-> next_dist = dist[1]; # 5946| } # 5947| Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:5985:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5983| else # 5984| lstate = 10; # 5985|-> dist[3] = dist[2]; # 5986| dist[2] = dist[1]; # 5987| dist[1] = dist[0]; Error: CLANG_WARNING: gcc-14.0.1-20240411/libbacktrace/elf.c:6059:35: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value # 6057| # 6058| if (unlikely (uncompressed_offset # 6059|-> - dict_start_offset < dist[0] + 1)) # 6060| { # 6061| elf_uncompress_failed (); Error: CLANG_WARNING: gcc-14.0.1-20240411/libcc1/libcp1plugin.cc:498:31: warning[core.NullDereference]: Dereference of null pointer # 496| cfun = NULL; # 497| pop_scope (); # 498|-> if (RECORD_OR_UNION_CODE_P (TREE_CODE (DECL_CONTEXT (current_function_decl)))) # 499| current_class_type = DECL_CONTEXT (current_function_decl); # 500| { Error: CLANG_WARNING: gcc-14.0.1-20240411/libcc1/libcp1plugin.cc:2976:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 2974| tail = &TREE_CHAIN (*tail); # 2975| } # 2976|-> return args; # 2977| } # 2978| Error: CPPCHECK_WARNING (CWE-457): gcc-14.0.1-20240411/libcpp/charset.cc:1301: warning[uninitvar]: Uninitialized variable: name_after_uax44_lm2 # 1299| and so should match U+1180. */ # 1300| if (q - name_after_uax44_lm2 == sizeof ("HANGULJUNGSEONGO-E") - 1 # 1301|-> && memcmp (name_after_uax44_lm2, "HANGULJUNGSEONGO-E", # 1302| sizeof ("HANGULJUNGSEONGO-E") - 1) == 0) # 1303| { Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/charset.cc:2873:24: warning[core.BitwiseShift]: Left shift overflows the capacity of 'cppchar_t' # 2871| { # 2872| c = bigend ? str.text[off + i] : str.text[off + nbwc - i - 1]; # 2873|-> result = (result << cwidth) | (c & cmask); # 2874| } # 2875| Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:189:15: warning[deadcode.DeadStores]: Although the value stored to 'flags' is used in the enclosing expression, the value is never actually read from 'flags' # 187| case 'h': case 'H': # 188| if (len == 1) # 189|-> return flags |= CPP_N_SMALL; # 190| break; # 191| case 'l': Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:193:15: warning[deadcode.DeadStores]: Although the value stored to 'flags' is used in the enclosing expression, the value is never actually read from 'flags' # 191| case 'l': # 192| if (len == 1) # 193|-> return flags |= CPP_N_MEDIUM; # 194| if (len == 2 && s[1] == 'l') # 195| return flags |= CPP_N_LARGE; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:195:15: warning[deadcode.DeadStores]: Although the value stored to 'flags' is used in the enclosing expression, the value is never actually read from 'flags' # 193| return flags |= CPP_N_MEDIUM; # 194| if (len == 2 && s[1] == 'l') # 195|-> return flags |= CPP_N_LARGE; # 196| break; # 197| case 'L': Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:199:15: warning[deadcode.DeadStores]: Although the value stored to 'flags' is used in the enclosing expression, the value is never actually read from 'flags' # 197| case 'L': # 198| if (len == 1) # 199|-> return flags |= CPP_N_MEDIUM; # 200| if (len == 2 && s[1] == 'L') # 201| return flags |= CPP_N_LARGE; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:201:15: warning[deadcode.DeadStores]: Although the value stored to 'flags' is used in the enclosing expression, the value is never actually read from 'flags' # 199| return flags |= CPP_N_MEDIUM; # 200| if (len == 2 && s[1] == 'L') # 201|-> return flags |= CPP_N_LARGE; # 202| break; # 203| default: Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:671:2: warning[deadcode.DeadStores]: Value stored to 'result' is never read # 669| } # 670| else # 671|-> result = 0; # 672| } # 673| Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/expr.cc: scope_hint: In function ‘unsigned int cpp_classify_number(cpp_reader*, const cpp_token*, const char**, location_t)’ gcc-14.0.1-20240411/libcpp/expr.cc:856:33: warning[-Wformat-security]: format not a string literal and no format arguments # 856 | cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS, # | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 857 | virtual_location, 0, message); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 854| ? N_("use of C++23 %<size_t%> integer constant") # 855| : N_("use of C++23 %<make_signed_t<size_t>%> integer constant"); # 856|-> cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS, # 857| virtual_location, 0, message); # 858| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/expr.cc:868:42: warning[-Wformat-security]: format not a string literal and no format arguments # 868 | cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT, # | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 869 | virtual_location, 0, message); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 866| "%<wb%> suffixes before C23"); # 867| if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false)) # 868|-> cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT, # 869| virtual_location, 0, message); # 870| else Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/expr.cc:871:39: warning[-Wformat-security]: format not a string literal and no format arguments # 871 | cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT, # | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 872 | virtual_location, 0, message); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 869| virtual_location, 0, message); # 870| else # 871|-> cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT, # 872| virtual_location, 0, message); # 873| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/expr.cc:878:35: warning[-Wformat-security]: format not a string literal and no format arguments # 878 | cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, # | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 879 | message); # | ~~~~~~~~ # 876| const char *message = N_("ISO C does not support literal " # 877| "%<wb%> suffixes before C23"); # 878|-> cpp_error_with_line (pfile, CPP_DL_PEDWARN, virtual_location, 0, # 879| message); # 880| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:2199:31: warning[core.BitwiseShift]: Left shift by '18446744073709551615' overflows the capacity of 'cpp_num_part' # 2197| { # 2198| i = precision - 1; # 2199|-> mask = (cpp_num_part) 1 << (i - PART_PRECISION); # 2200| for (; ; i--, mask >>= 1) # 2201| if (rhs.high & mask) Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/expr.cc:2199:31: warning[core.BitwiseShift]: Left shift overflows the capacity of 'cpp_num_part' # 2197| { # 2198| i = precision - 1; # 2199|-> mask = (cpp_num_part) 1 << (i - PART_PRECISION); # 2200| for (; ; i--, mask >>= 1) # 2201| if (rhs.high & mask) Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/files.cc:870:48: warning[unix.Malloc]: Use of memory after it is freed # 868| /* We may have read the file under a different name. Look # 869| for likely candidates and compare file contents to be sure. */ # 870|-> for (_cpp_file *f = pfile->all_files; f; f = f->next_file) # 871| { # 872| if (f == file) Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/files.cc:896:14: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 894| /* Size might have changed in read_file(). */ # 895| && ref_file->st.st_size == file->st.st_size # 896|-> && !memcmp (ref_file->buffer, file->buffer, # 897| file->st.st_size)); # 898| Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/line-map.cc:24: included_from: Included from here. gcc-14.0.1-20240411/libcpp/include/line-map.h:652:10: warning[core.NullDereference]: Access to field 'start_location' results in a dereference of a null pointer (loaded from variable 'map') # 650| MAP_START_LOCATION (const line_map *map) # 651| { # 652|-> return map->start_location; # 653| } # 654| Error: CPPCHECK_WARNING (CWE-590): gcc-14.0.1-20240411/libcpp/init.cc:364: error[autovarInvalidDeallocation]: Deallocation of an auto-variable (.) results in undefined behaviour. # 362| free (run->base); # 363| if (run != &pfile->base_run) # 364|-> free (run); # 365| } # 366| Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/init.cc:821:24: warning[deadcode.DeadStores]: Value stored to 'hash' during its initialization is never read # 819| && buf[3] == ' ') # 820| { # 821|-> const cpp_token *hash = _cpp_lex_direct (pfile); # 822| gcc_checking_assert (hash->type == CPP_HASH); # 823| pfile->state.in_directive = 1; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/init.cc:824:24: warning[deadcode.DeadStores]: Value stored to 'number' during its initialization is never read # 822| gcc_checking_assert (hash->type == CPP_HASH); # 823| pfile->state.in_directive = 1; # 824|-> const cpp_token *number = _cpp_lex_direct (pfile); # 825| gcc_checking_assert (number->type == CPP_NUMBER); # 826| const cpp_token *string = _cpp_lex_direct (pfile); Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:1812:7: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 1810| location_t loc; # 1811| bidi::kind kind = get_bidi_utf8 (pfile, cur - 1, &loc); # 1812|-> maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); # 1813| } # 1814| if (!warn_invalid_utf8_p) Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:1930:5: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 1928| location_t loc; # 1929| bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc); # 1930|-> maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); # 1931| } # 1932| buffer->cur++; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:2099:8: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 2097| location_t loc; # 2098| bidi::kind kind = get_bidi_utf8 (pfile, buffer->cur, &loc); # 2099|-> maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/false, loc); # 2100| } # 2101| if (_cpp_valid_utf8 (pfile, &buffer->cur, buffer->rlimit, 1 + !first, Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:2120:8: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 2118| kind = get_bidi_ucn (pfile, buffer->cur, # 2119| buffer->cur[-1] == 'U', &loc); # 2120|-> maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc); # 2121| } # 2122| if (_cpp_valid_ucn (pfile, &buffer->cur, buffer->rlimit, 1 + !first, Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:2921:8: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value # 2919| else # 2920| kind = get_bidi_ucn (pfile, cur + 1, cur[0] == 'U', &loc); # 2921|-> maybe_warn_bidi_on_char (pfile, kind, /*ucn_p=*/true, loc); # 2922| } # 2923| cur++; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:4629:9: warning[core.NullDereference]: Array access results in an undefined pointer dereference # 4627| c = EOF; # 4628| if (token2->flags & DIGRAPH) # 4629|-> c = digraph_spellings[(int) b - (int) CPP_FIRST_DIGRAPH][0]; # 4630| else if (token_spellings[b].category == SPELL_OPERATOR) # 4631| c = token_spellings[b].name[0]; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:5327:10: warning[deadcode.DeadStores]: Value stored to 'ok' during its initialization is never read # 5325| buffer->next_line = pos; # 5326| buffer->need_line = true; # 5327|-> bool ok = _cpp_get_fresh_line (pfile); # 5328| gcc_checking_assert (ok); # 5329| Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/lex.cc:5625:8: warning[deadcode.DeadStores]: Value stored to 'raw' is never read # 5623| { # 5624| pos += delim_len + 1; # 5625|-> raw = false; # 5626| goto done_string; # 5627| } Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/macro.cc: scope_hint: In member function ‘vaopt_state::update_type vaopt_state::update(const cpp_token*)’ gcc-14.0.1-20240411/libcpp/macro.cc:185:26: warning[-Wformat-security]: format not a string literal and no format arguments # 185 | cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc, # | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 186 | vaopt_paste_error); # | ~~~~~~~~~~~~~~~~~~ # 183| if (m_state == 2 && token->type == CPP_PASTE) # 184| { # 185|-> cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc, # 186| vaopt_paste_error); # 187| return ERROR; Error: COMPILER_WARNING (CWE-134): gcc-14.0.1-20240411/libcpp/macro.cc:214:34: warning[-Wformat-security]: format not a string literal and no format arguments # 214 | cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc, # | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 215 | vaopt_paste_error); # | ~~~~~~~~~~~~~~~~~~ # 212| if (was_paste) # 213| { # 214|-> cpp_error_at (m_pfile, CPP_DL_ERROR, token->src_loc, # 215| vaopt_paste_error); # 216| return ERROR; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/macro.cc:571:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 569| if (pfile->cb.remap_filename && !pfile->state.in_directive) # 570| name = pfile->cb.remap_filename (name); # 571|-> len = strlen (name); # 572| buf = _cpp_unaligned_alloc (pfile, len * 2 + 3); # 573| result = buf; Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/mkdeps.cc:185:12: warning[core.NullDereference]: Array access (from variable 'buf') results in a null pointer dereference # 183| } # 184| # 185|-> buf[dst] = 0; # 186| return buf; # 187| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/mkdeps.cc:456:7: warning[deadcode.DeadStores]: Value stored to 'column' is never read # 454| fputs (":", fp); # 455| column++; # 456|-> column = make_write_vec (d->modules, fp, column, colmax, 0, ".c++m"); # 457| fputs ("\n", fp); # 458| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/mkdeps.cc:469:4: warning[deadcode.DeadStores]: Value stored to 'column' is never read # 467| fputs (":", fp); # 468| column++; # 469|-> column = make_write_name (d->cmi_name, fp, column, colmax); # 470| fputs ("\n", fp); # 471| Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/mkdeps.cc:473:4: warning[deadcode.DeadStores]: Value stored to 'column' is never read # 471| # 472| column = fprintf (fp, ".PHONY:"); # 473|-> column = make_write_name (d->module_name, fp, column, colmax, # 474| true, ".c++m"); # 475| fputs ("\n", fp); Error: CLANG_WARNING: gcc-14.0.1-20240411/libcpp/mkdeps.cc:487:4: warning[deadcode.DeadStores]: Value stored to 'column' is never read # 485| fputs (":|", fp); # 486| column++; # 487|-> column = make_write_name (d->targets[0], fp, column, colmax); # 488| fputs ("\n", fp); # 489| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/bid/bid2dpd_dpd2bid.c:299:3: warning[deadcode.DeadStores]: Value stored to 'exp' is never read # 297| sign.w[0] = 0; # 298| comb = (x.w[1] /*& 0x7fffc00000000000ull */ ) >> 46; # 299|-> exp = 0; # 300| if ((comb & 0x1e000) == 0x1e000) { # 301| res = x; Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:2150:11: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 2148| decLnOp(dac, lhs, &aset, &status); /* dac=ln(lhs) */ # 2149| /* [no error possible, as lhs 0 already handled] */ # 2150|-> if (ISZERO(dac)) { /* x==1, 1.0, etc. */ # 2151| /* need to return fully-padded 1.0000 etc., but rhsint->1 */ # 2152| *dac->lsu=1; /* was 0, make int 1 */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:3868:7: warning[deadcode.DeadStores]: Value stored to 'bits' is never read # 3866| Int adjust; /* work */ # 3867| Int lexp=lhs->exponent; /* save in case LHS==RES */ # 3868|-> bits=lhs->bits; /* .. */ # 3869| residue=0; /* clear accumulator */ # 3870| decCopyFit(res, rhs, set, &residue, status); /* copy (as needed) */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:3904:7: warning[deadcode.DeadStores]: Value stored to 'bits' is never read # 3902| Int adjust; /* work */ # 3903| Int rexp=rhs->exponent; /* save in case RHS==RES */ # 3904|-> bits=rhs->bits; /* be clean */ # 3905| residue=0; /* clear accumulator */ # 3906| decCopyFit(res, lhs, set, &residue, status); /* copy (as needed) */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:4581:16: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value # 4579| /* if the residue is zero, the operation is done (unless divide */ # 4580| /* or divideInteger and still not enough digits yet) */ # 4581|-> if (*var1==0 && var1units==1) { /* residue is 0 */ # 4582| if (op&(REMAINDER|REMNEAR)) break; # 4583| if ((op&DIVIDE) && (exponent<=maxexponent)) break; Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:4636:6: warning[deadcode.DeadStores]: Value stored to 'accunits' is never read # 4634| accunits=decShiftToLeast(accnext, accunits, drop); # 4635| accdigits=decGetDigits(accnext, accunits); # 4636|-> accunits=D2U(accdigits); # 4637| /* [exponent was adjusted in the loop] */ # 4638| } Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:4762:6: warning[deadcode.DeadStores]: Value stored to 'accunits' is never read # 4760| expunits, accnext, -(Int)powers[exprem]); # 4761| accdigits=decGetDigits(accnext, accunits); /* count digits exactly */ # 4762|-> accunits=D2U(accdigits); /* and recalculate the units for copy */ # 4763| /* [exponent is as for original remainder] */ # 4764| bits^=DECNEG; /* flip the sign */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:5021:7: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 5019| lp=zacc+(rip-zrhi); /* where to add the lhs */ # 5020| for (lip=zlhi; lip<=lmsi; lip++, lp++) { /* over each item in lhs */ # 5021|-> *lp+=(uLong)(*lip)*(*rip); /* [this should in-line] */ # 5022| } /* lip loop */ # 5023| lazy--; Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:5037:13: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 5035| else { /* two-place carry [fairly rare] */ # 5036| uInt carry2=(uInt)(lcarry/FASTBASE); /* top top part */ # 5037|-> *(lp+2)+=carry2; /* add to item+2 */ # 5038| *lp-=((uLong)FASTBASE*FASTBASE*carry2); /* [slow] */ # 5039| carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); /* [inline] */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/decNumber.c:5041:11: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage # 5039| carry=(uInt)(lcarry-((uLong)FASTBASE*carry2)); /* [inline] */ # 5040| } # 5041|-> *(lp+1)+=carry; /* add to item above [inline] */ # 5042| *lp-=((uLong)FASTBASE*carry); /* [inline] */ # 5043| } /* carry resolution */ Error: GCC_ANALYZER_WARNING (CWE-457): gcc-14.0.1-20240411/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitCompare’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:6276:37: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*u’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:181: included_from: Included from here. gcc-14.0.1-20240411/libdecnumber/decNumber.c:6204:36: note: in expansion of macro ‘D2U’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:6203:36: note: in expansion of macro ‘D2U’ # 6274| else { /* non-negative result */ # 6275| /* check units of the result before freeing any storage */ # 6276|-> for (u=acc; u<acc+accunits-1 && *u==0;) u++; # 6277| result=(*u==0 ? 0 : +1); # 6278| } Error: GCC_ANALYZER_WARNING (CWE-126): gcc-14.0.1-20240411/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitAddSub’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:6376:19: warning[-Wanalyzer-out-of-bounds]: buffer over-read gcc-14.0.1-20240411/libdecnumber/decNumber.c: scope_hint: In function ‘decUnitAddSub’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:7213:26: note: in expansion of macro ‘D2U’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:6376:19: note: read of 2 bytes from after the end of ‘uarrone’ gcc-14.0.1-20240411/libdecnumber/decNumber.c:6376:19: note: valid subscripts for ‘uarrone’ are ‘[0]’ to ‘[0]’ # └──────────────────────────────────┘ # ^ # 6374| carry+=*a; # 6375| a++; # 6376|-> carry+=((eInt)*b)*m; /* [special-casing m=1/-1 */ # 6377| b++; /* here is not a win] */ # 6378| /* here carry is new Unit of digits; it could be +ve or -ve */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libdecnumber/dpd/decimal64.c:677:10: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 675| for(; digits>0;) { /* each output bunch */ # 676| #if DECDPUN==3 /* fast path, 3-at-a-time */ # 677|-> bin=*inu; /* 3 digits ready for convert */ # 678| digits-=3; /* [may go negative] */ # 679| inu++; /* may need another */ Error: CLANG_WARNING: gcc-14.0.1-20240411/libgcc/libgcov-driver.c:242: included_from: Included from here. gcc-14.0.1-20240411/libgcc/libgcov-driver-system.c:202:4: warning[unix.Malloc]: Argument to free() is offset by 1 byte from the start of memory allocated by malloc() # 200| *buffer_ptr = '\0'; # 201| # 202|-> free (filename); # 203| filename = buffer; # 204| p = buffer + start + repl_length; Error: CLANG_WARNING: gcc-14.0.1-20240411/libgcc/libgcov-driver.c:700:7: warning[unix.Malloc]: Argument to free() is offset by 1 byte from the start of memory allocated by malloc() # 698| { # 699| dump_one_gcov (gi_ptr, &gf, run_counted, run_max, mode); # 700|-> free (gf.filename); # 701| } # 702| Error: COMPILER_WARNING: gcc-14.0.1-20240411/libgcc/libgcov-util.c: scope_hint: In function ‘void tag_counters(unsigned int, int)’ gcc-14.0.1-20240411/libgcc/libgcov-util.c:214:59: warning[-Wcalloc-transposed-args]: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 214 | k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (sizeof (gcov_type), # | ^~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/libgcc/libgcov-util.c:214:59: note: earlier argument should specify number of elements, later size of each element # 212| k_ctrs[tag_ix].num = n_counts; # 213| # 214|-> k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (sizeof (gcov_type), # 215| n_counts); # 216| gcc_assert (values); Error: COMPILER_WARNING: gcc-14.0.1-20240411/libgcc/libgcov-util.c: scope_hint: In function ‘void topn_to_memory_representation(gcov_ctr_info*)’ gcc-14.0.1-20240411/libgcc/libgcov-util.c:529:43: warning[-Wcalloc-transposed-args]: ‘void* calloc(size_t, size_t)’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument # 529 | = (struct gcov_kvp *)xcalloc (sizeof (struct gcov_kvp), n); # | ^~~~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/libgcc/libgcov-util.c:529:43: note: earlier argument should specify number of elements, later size of each element # 527| { # 528| struct gcov_kvp *tuples # 529|-> = (struct gcov_kvp *)xcalloc (sizeof (struct gcov_kvp), n); # 530| for (unsigned i = 0; i < n - 1; i++) # 531| tuples[i].next = &tuples[i + 1]; Error: CLANG_WARNING: gcc-14.0.1-20240411/libgcc/libgcov-merge.c:26: included_from: Included from here. gcc-14.0.1-20240411/libgcc/libgcov.h:522:11: warning[core.NullDereference]: Access to field 'count' results in a dereference of a null pointer (loaded from variable 'minimal_node') # 520| if (counters[1] == GCOV_TOPN_MAXIMUM_TRACKED_VALUES) # 521| { # 522|-> if (--minimal_node->count < count) # 523| { # 524| minimal_node->value = value; Error: CLANG_WARNING: gcc-14.0.1-20240411/libgcc/libgcov.h:570:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_node' # 568| # 569| /* Increment number of nodes. */ # 570|-> if (success) # 571| gcov_counter_add (&counters[1], 1, use_atomic); # 572| } Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/config/gcn/gcn-run.cc:38: included_from: Included from here. gcc-14.0.1-20240411/libgomp/config/gcn/libgomp-gcn.h:45:8: warning[-Wpedantic]: ISO C forbids zero-size array ‘data’ # 45 | char data[0]; # | ^~~~ # 43| { # 44| int64_t size; # 45|-> char data[0]; # 46| }; # 47| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/choose-temp.c:71:7: warning[security.insecureAPI.mktemp]: Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead # 69| strcpy (temp_filename + len, TEMP_FILE); # 70| # 71|-> if (mktemp (temp_filename) == 0) # 72| abort (); # 73| return temp_filename; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/cp-demangle.c:5183: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5181| # 5182| adpm[i].next = dpi->modifiers; # 5183|-> dpi->modifiers = &adpm[i]; # 5184| adpm[i].mod = typed_name; # 5185| adpm[i].printed = 0; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/cp-demangle.c:5221: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5219| adpm[i] = adpm[i - 1]; # 5220| adpm[i].next = &adpm[i - 1]; # 5221|-> dpi->modifiers = &adpm[i]; # 5222| # 5223| adpm[i - 1].mod = typed_name; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/cp-demangle.c:5242: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5240| { # 5241| dpt.next = dpi->templates; # 5242|-> dpi->templates = &dpt; # 5243| dpt.template_decl = typed_name; # 5244| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/cp-demangle.c:5265:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5263| # 5264| if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE) # 5265|-> dpi->templates = dpt.next; # 5266| # 5267| /* If the modifiers didn't get printed by the type, print them Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/cp-demangle.c:5717: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5715| # 5716| adpm[0].next = hold_modifiers; # 5717|-> dpi->modifiers = &adpm[0]; # 5718| adpm[0].mod = dc; # 5719| adpm[0].printed = 0; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/cp-demangle.c:6745: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 6743| { # 6744| dpt.next = dpi->templates; # 6745|-> dpi->templates = &dpt; # 6746| dpt.template_decl = dpi->current_template; # 6747| } Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/libiberty/cp-demangle.c:6752: error[uninitStructMember]: Uninitialized struct member: dpt.next # 6750| # 6751| if (dpi->current_template != NULL) # 6752|-> dpi->templates = dpt.next; # 6753| } # 6754| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/cp-demangle.c:6752:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 6750| # 6751| if (dpi->current_template != NULL) # 6752|-> dpi->templates = dpt.next; # 6753| } # 6754| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/cplus-dem.c:196:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 194| } # 195| # 196|-> return (ret); # 197| } # 198| Error: GCC_ANALYZER_WARNING (CWE-457): gcc-14.0.1-20240411/libiberty/cplus-dem.c: scope_hint: In function ‘cplus_demangle’ gcc-14.0.1-20240411/libiberty/cplus-dem.c:196:10: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ret’ gcc-14.0.1-20240411/libiberty/cplus-dem.c:50: included_from: Included from here. gcc-14.0.1-20240411/libiberty/cplus-dem.c:172:7: note: in expansion of macro ‘GNU_V3_DEMANGLING’ gcc-14.0.1-20240411/libiberty/cplus-dem.c:179:7: note: in expansion of macro ‘JAVA_DEMANGLING’ gcc-14.0.1-20240411/libiberty/cplus-dem.c:186:7: note: in expansion of macro ‘GNAT_DEMANGLING’ gcc-14.0.1-20240411/libiberty/cplus-dem.c:189:7: note: in expansion of macro ‘DLANG_DEMANGLING’ # 194| } # 195| # 196|-> return (ret); # 197| } # 198| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/cplus-dem.c:400:27: warning[deadcode.DeadStores]: Value stored to 'p' is never read # 398| if (strncmp (p, special[k][0], slen) == 0) # 399| { # 400|-> p += slen; # 401| slen = strlen (special[k][1]); # 402| memcpy (d, special[k][1], slen); Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert’ gcc-14.0.1-20240411/libiberty/dyn-string.c:251:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 249| abort (); # 250| # 251|-> if (dyn_string_resize (dest, dest->length + src->length) == NULL) # 252| return 0; # 253| /* Make room for the insertion. Be sure to copy the NUL. */ Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_cstr’ gcc-14.0.1-20240411/libiberty/dyn-string.c:274:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 272| int length = strlen (src); # 273| # 274|-> if (dyn_string_resize (dest, dest->length + length) == NULL) # 275| return 0; # 276| /* Make room for the insertion. Be sure to copy the NUL. */ Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_insert_char’ gcc-14.0.1-20240411/libiberty/dyn-string.c:295:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 293| int i; # 294| # 295|-> if (dyn_string_resize (dest, dest->length + 1) == NULL) # 296| return 0; # 297| /* Make room for the insertion. Be sure to copy the NUL. */ Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append’ gcc-14.0.1-20240411/libiberty/dyn-string.c:314:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 312| dyn_string_append (dyn_string_t dest, dyn_string_t s) # 313| { # 314|-> if (dyn_string_resize (dest, dest->length + s->length) == 0) # 315| return 0; # 316| strcpy (dest->s + dest->length, s->s); Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_cstr’ gcc-14.0.1-20240411/libiberty/dyn-string.c:332:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 330| /* The new length is the old length plus the size of our string, plus # 331| one for the null at the end. */ # 332|-> if (dyn_string_resize (dest, dest->length + len) == NULL) # 333| return 0; # 334| strcpy (dest->s + dest->length, s); Error: GCC_ANALYZER_WARNING (CWE-465): gcc-14.0.1-20240411/libiberty/dyn-string.c: scope_hint: In function ‘dyn_string_append_char’ gcc-14.0.1-20240411/libiberty/dyn-string.c:346:6: warning[-Wanalyzer-deref-before-check]: check of ‘dest’ for NULL after already dereferencing it # 344| { # 345| /* Make room for the extra character. */ # 346|-> if (dyn_string_resize (dest, dest->length + 1) == NULL) # 347| return 0; # 348| /* Append the character; it will overwrite the old NUL. */ Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/libiberty/hashtab.c:187: error[arrayIndexOutOfBounds]: Array 'prime_tab[30]' accessed at index 30, which is out of bounds. # 185| # 186| /* If we've run out of primes, abort. */ # 187|-> if (n > prime_tab[low].prime) # 188| { # 189| fprintf (stderr, "Cannot find prime bigger than %lu\n", n); Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/libiberty/make-relative-prefix.c: scope_hint: In function ‘save_string’ gcc-14.0.1-20240411/libiberty/make-relative-prefix.c:110:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 108| char *result = (char *) malloc (len + 1); # 109| # 110|-> memcpy (result, s, len); # 111| result[len] = 0; # 112| return result; Error: GCC_ANALYZER_WARNING (CWE-127): gcc-14.0.1-20240411/libiberty/make-relative-prefix.c: scope_hint: In function ‘split_directories’ gcc-14.0.1-20240411/libiberty/make-relative-prefix.c:192:11: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read # └──────────────────────────┘ # ^ # 190| dirs[num_dirs] = NULL; # 191| # 192|-> if (dirs[num_dirs - 1] == NULL) # 193| { # 194| free_split_directories (dirs); Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/make-relative-prefix.c:192:26: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value due to array index out of bounds # 190| dirs[num_dirs] = NULL; # 191| # 192|-> if (dirs[num_dirs - 1] == NULL) # 193| { # 194| free_split_directories (dirs); Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/make-relative-prefix.c: scope_hint: In function ‘make_relative_prefix_1’ gcc-14.0.1-20240411/libiberty/make-relative-prefix.c:274:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘nstore’ # 272| if (endp == startp) # 273| { # 274|-> nstore[0] = '.'; # 275| nstore[1] = DIR_SEPARATOR; # 276| nstore[2] = '\0'; Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/libiberty/make-relative-prefix.c:280:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘nstore’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 278| else # 279| { # 280|-> memcpy (nstore, startp, endp - startp); # 281| if (! IS_DIR_SEPARATOR (endp[-1])) # 282| { Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/obstack.c:147:33: warning[core.NullDereference]: Access to field 'limit' results in a dereference of a null pointer (loaded from variable 'chunk') # 145| h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, # 146| alignment - 1); # 147|-> h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size; # 148| chunk->prev = 0; # 149| /* The initial chunk now contains no empty object. */ Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/obstack.c: scope_hint: In function ‘_obstack_newchunk’ gcc-14.0.1-20240411/libiberty/obstack.c:210:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_chunk’ # 208| (*obstack_alloc_failed_handler)(); # 209| h->chunk = new_chunk; # 210|-> new_chunk->prev = old_chunk; # 211| new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; # 212| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/obstack.c:210:19: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'new_chunk') # 208| (*obstack_alloc_failed_handler)(); # 209| h->chunk = new_chunk; # 210|-> new_chunk->prev = old_chunk; # 211| new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; # 212| Error: CPPCHECK_WARNING (CWE-401): gcc-14.0.1-20240411/libiberty/regex.c:2444: error[memleak]: Memory leak: compile_stack.stack # 2442| } # 2443| # 2444|-> if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE); # 2445| #ifdef WCHAR # 2446| bufp->buffer = (char*)COMPILED_BUFFER_VAR; Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/regex.c:643: included_from: Included from here. gcc-14.0.1-20240411/libiberty/regex.c:5176:34: warning[core.NullDereference]: Dereference of null pointer # 5174| while (range > lim # 5175| && !fastmap[(unsigned char) # 5176|-> translate[(unsigned char) *d++]]) # 5177| range--; # 5178| else Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/regex.c:5179:64: warning[core.NullDereference]: Dereference of null pointer # 5177| range--; # 5178| else # 5179|-> while (range > lim && !fastmap[(unsigned char) *d++]) # 5180| range--; # 5181| Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/simple-object-mach-o.c: scope_hint: In function ‘simple_object_mach_o_write_segment’ gcc-14.0.1-20240411/libiberty/simple-object-mach-o.c:1159:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’ # 1157| if (sobj->segment_name != NULL) # 1158| { # 1159|-> index[sect*4+0] = (unsigned int) offset; # 1160| index[sect*4+1] = secsize; # 1161| /* Stash the section name in our table. */ Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/simple-object-mach-o.c:1210:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’ # 1208| created section. */ # 1209| # 1210|-> secsize = (offset - index[0]); # 1211| if (!simple_object_mach_o_write_section_header (sobj, descriptor, # 1212| sechdr_offset, Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/simple-object-mach-o.c:1217:13: warning[core.NullDereference]: Access to field 'align' results in a dereference of a null pointer (loaded from field 'sections') # 1215| 0 /*secaddr*/, # 1216| secsize, index[0], # 1217|-> sobj->sections->align, # 1218| errmsg, err)) # 1219| return 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/simple-object-mach-o.c:1256:7: warning[deadcode.DeadStores]: Value stored to 'secaddr' is never read # 1254| # 1255| sechdr_offset += sechdrsize; # 1256|-> secaddr += name_offset; # 1257| offset += name_offset; # 1258| Error: CLANG_WARNING: gcc-14.0.1-20240411/libiberty/simple-object-xcoff.c:844:5: warning[deadcode.DeadStores]: Value stored to 'align' is never read # 842| flags = STYP_DATA; # 843| if (align > 13) # 844|-> align = 13; # 845| if (u64) # 846| set_32 (hdr + offsetof (struct external_scnhdr, u.xcoff64.s_flags), flags); Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:295: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 293| /* Copy over .note.GNU-stack section under the same name if present. */ # 294| else if (strcmp (name, ".note.GNU-stack") == 0) # 295|-> return strcpy (newname, name); # 296| /* Copy over .note.gnu.property section under the same name if present. */ # 297| else if (strcmp (name, ".note.gnu.property") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:298: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 296| /* Copy over .note.gnu.property section under the same name if present. */ # 297| else if (strcmp (name, ".note.gnu.property") == 0) # 298|-> return strcpy (newname, name); # 299| /* Copy over .comment section under the same name if present. Solaris # 300| ld uses them to relax its checking of ELF gABI access rules for Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:303: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 301| COMDAT sections in objects produced by GCC. */ # 302| else if (strcmp (name, ".comment") == 0) # 303|-> return strcpy (newname, name); # 304| /* Copy over .GCC.command.line section under the same name if present. */ # 305| else if (strcmp (name, ".GCC.command.line") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:306: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 304| /* Copy over .GCC.command.line section under the same name if present. */ # 305| else if (strcmp (name, ".GCC.command.line") == 0) # 306|-> return strcpy (newname, name); # 307| /* Copy over .ctf section under the same name if present. */ # 308| else if (strcmp (name, ".ctf") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:309: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 307| /* Copy over .ctf section under the same name if present. */ # 308| else if (strcmp (name, ".ctf") == 0) # 309|-> return strcpy (newname, name); # 310| /* Copy over .BTF section under the same name if present. */ # 311| else if (strcmp (name, ".BTF") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/libiberty/simple-object.c:312: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 310| /* Copy over .BTF section under the same name if present. */ # 311| else if (strcmp (name, ".BTF") == 0) # 312|-> return strcpy (newname, name); # 313| free (newname); # 314| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/strerror.c: scope_hint: In function ‘strtoerrno’ gcc-14.0.1-20240411/libiberty/strerror.c:756:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_names’ # 754| for (errnoval = 0; errnoval < num_error_names; errnoval++) # 755| { # 756|-> if ((error_names[errnoval] != NULL) && # 757| (strcmp (name, error_names[errnoval]) == 0)) # 758| { Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/libiberty/strsignal.c: scope_hint: In function ‘strtosigno’ gcc-14.0.1-20240411/libiberty/strsignal.c:524:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘signal_names’ # 522| for (signo = 0; signo < num_signal_names; signo++) # 523| { # 524|-> if ((signal_names[signo] != NULL) && # 525| (strcmp (name, signal_names[signo]) == 0)) # 526| { Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/libiberty/vprintf-support.c:52: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 50| va_copy (ap, args); # 51| #else # 52|-> memcpy ((void *) &ap, (void *) &args, sizeof (va_list)); # 53| #endif # 54| Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/libiberty/vprintf-support.c:65: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 63| { # 64| ++p; # 65|-> total_width += abs (va_arg (ap, int)); # 66| } # 67| else Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/libiberty/vprintf-support.c:75: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 73| { # 74| ++p; # 75|-> total_width += abs (va_arg (ap, int)); # 76| } # 77| else Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/libiberty/vprintf-support.c:129: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 127| switch (prec) # 128| { # 129|-> case 0: (void) va_arg (ap, int); break; # 130| case 1: (void) va_arg (ap, long int); break; # 131| case 2: (void) va_arg (ap, long long int); break; Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/lto-plugin/lto-plugin.c: scope_hint: In function ‘write_resolution’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:607:3: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(resolution_file, "w")’ where non-null expected gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:48: included_from: Included from here. gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:52: included_from: Included from here. /usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null # 605| } # 606| # 607|-> fprintf (f, "%d\n", included_files); # 608| # 609| for (i = 0; i < num_claimed_files; i++) Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/lto-plugin/lto-plugin.c: scope_hint: In function ‘write_resolution’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:607:3: warning[-Wanalyzer-null-argument]: use of NULL ‘f’ where non-null expected gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:48: included_from: Included from here. gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:52: included_from: Included from here. /usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null # 605| } # 606| # 607|-> fprintf (f, "%d\n", included_files); # 608| # 609| for (i = 0; i < num_claimed_files; i++) Error: CLANG_WARNING: gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:607:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 605| } # 606| # 607|-> fprintf (f, "%d\n", included_files); # 608| # 609| for (i = 0; i < num_claimed_files; i++) Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/lto-plugin/lto-plugin.c: scope_hint: In function ‘add_output_files’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:642:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f’ where non-null expected /usr/include/stdio.h:654:14: note: argument 3 of ‘fgets’ must be non-null # 640| buf = s; # 641| cont: # 642|-> if (!fgets (buf, piece, f)) # 643| { # 644| free (s); Error: CLANG_WARNING: gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:696:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 694| t = writeargv (&argv[1], args); # 695| check (t == 0, LDPL_FATAL, "could not write arguments"); # 696|-> t = fclose (args); # 697| check (t == 0, LDPL_FATAL, "could not close arguments file"); # 698| Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/lto-plugin/lto-plugin.c: scope_hint: In function ‘all_symbols_read_handler’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:859:7: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(offload_objects_file_name, "w")’ where non-null expected gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:858:7: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:858:7: note: in expansion of macro ‘check’ /usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null # 857| f = fopen (offload_objects_file_name, "w"); # 858| check (f, LDPL_FATAL, "could not open file with offload objects"); # 859|-> fprintf (f, "%u\n", num_offload_files); # 860| # 861| /* Skip the dummy item at the start of the list. */ Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/lto-plugin/lto-plugin.c: scope_hint: In function ‘all_symbols_read_handler’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:859:7: warning[-Wanalyzer-null-argument]: use of NULL ‘f’ where non-null expected gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:575:3: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:858:7: note: in expansion of macro ‘check’ gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:858:7: note: in expansion of macro ‘check’ /usr/include/stdio.h:357:12: note: argument 1 of ‘fprintf’ must be non-null # 857| f = fopen (offload_objects_file_name, "w"); # 858| check (f, LDPL_FATAL, "could not open file with offload objects"); # 859|-> fprintf (f, "%u\n", num_offload_files); # 860| # 861| /* Skip the dummy item at the start of the list. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/lto-plugin/lto-plugin.c:859:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 857| f = fopen (offload_objects_file_name, "w"); # 858| check (f, LDPL_FATAL, "could not open file with offload objects"); # 859|-> fprintf (f, "%u\n", num_offload_files); # 860| # 861| /* Skip the dummy item at the start of the list. */ Error: COMPILER_WARNING (CWE-569): gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c: scope_hint: In function ‘courierize’ gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:574:20: warning[-Wparentheses]: suggest parentheses around ‘&&’ within ‘||’ # 573 | while (at(tos, idx) == '\n' # | ~~~~~~~~~~~~~~~~~~~~ # 574 | && (at(tos, idx+1) == '.') # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 572| } # 573| while (at(tos, idx) == '\n' # 574|-> && (at(tos, idx+1) == '.') # 575| || (at(tos,idx+1) == '|')); # 576| cattext(&out,"@end smallexample"); Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1028:10: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined # 1026| int length = 0; # 1027| # 1028|-> while (isspace(*string) || *string == '-') { # 1029| if (*string == '-') # 1030| { Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c: scope_hint: In function ‘newentry’ gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1153:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new’ # 1151| { # 1152| dict_type *new = (dict_type *)malloc(sizeof(dict_type)); # 1153|-> new->word = word; # 1154| new->next = root; # 1155| root = new; Error: GCC_ANALYZER_WARNING (CWE-401): gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c: scope_hint: In function ‘add_to_definition’ gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1170:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 1168| { # 1169| entry->code_length += 2; # 1170|-> entry->code = # 1171| (stinst_type *) realloc((char *)(entry->code), # 1172| entry->code_length *sizeof(word_type)); Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1171:19: warning[unix.MallocSizeof]: Result of 'realloc' is converted to a pointer of type 'stinst_type', which is incompatible with sizeof operand type 'word_type' # 1169| entry->code_length += 2; # 1170| entry->code = # 1171|-> (stinst_type *) realloc((char *)(entry->code), # 1172| entry->code_length *sizeof(word_type)); # 1173| } Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1174:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*entry.code + (long unsigned int)*entry.code_end * 8’ # 1172| entry->code_length *sizeof(word_type)); # 1173| } # 1174|-> entry->code[entry->code_end] = word; # 1175| # 1176| return entry->code_end++; Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1286:5: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value # 1284| } # 1285| # 1286|-> free(word); # 1287| return(ret); # 1288| } Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1387:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'buffer.ptr' # 1385| read_in(&buffer, stdin); # 1386| remove_noncomments(&buffer, ptr); # 1387|-> for (i= 1; i < ac; i++) # 1388| { # 1389| if (av[i][0] == '-') Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1387:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'pptr.ptr' # 1385| read_in(&buffer, stdin); # 1386| remove_noncomments(&buffer, ptr); # 1387|-> for (i= 1; i < ac; i++) # 1388| { # 1389| if (av[i][0] == '-') Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1400:5: warning[unix.Malloc]: Potential leak of memory pointed to by 'b.ptr' # 1398| if (!f) # 1399| { # 1400|-> fprintf(stderr,"Can't open the input file %s\n",av[i+1]); # 1401| return 33; # 1402| } Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1401:5: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'pptr' is still referred to by the global variable 'ptr' upon returning to the caller. This will be a dangling reference # 1399| { # 1400| fprintf(stderr,"Can't open the input file %s\n",av[i+1]); # 1401|-> return 33; # 1402| } # 1403| if(Verbose) fprintf(stderr, "Reading -f '%s'\n", av[i+1]); Error: CLANG_WARNING: gcc-14.0.1-20240411/newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed/newlib/doc/makedoc.c:1423:5: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'pptr' is still referred to by the global variable 'ptr' upon returning to the caller. This will be a dangling reference # 1421| } # 1422| write_buffer(stack+0); # 1423|-> return status; # 1424| } Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/choose-temp.c:71:7: warning[security.insecureAPI.mktemp]: Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file. Use 'mkstemp' instead # 69| strcpy (temp_filename + len, TEMP_FILE); # 70| # 71|-> if (mktemp (temp_filename) == 0) # 72| abort (); # 73| return temp_filename; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:5131: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5129| # 5130| adpm[i].next = dpi->modifiers; # 5131|-> dpi->modifiers = &adpm[i]; # 5132| adpm[i].mod = typed_name; # 5133| adpm[i].printed = 0; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:5169: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5167| adpm[i] = adpm[i - 1]; # 5168| adpm[i].next = &adpm[i - 1]; # 5169|-> dpi->modifiers = &adpm[i]; # 5170| # 5171| adpm[i - 1].mod = typed_name; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:5190: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5188| { # 5189| dpt.next = dpi->templates; # 5190|-> dpi->templates = &dpt; # 5191| dpt.template_decl = typed_name; # 5192| } Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:5197:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 5195| # 5196| if (typed_name->type == DEMANGLE_COMPONENT_TEMPLATE) # 5197|-> dpi->templates = dpt.next; # 5198| # 5199| /* If the modifiers didn't get printed by the type, print them Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:5649: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 5647| # 5648| adpm[0].next = hold_modifiers; # 5649|-> dpi->modifiers = &adpm[0]; # 5650| adpm[0].mod = dc; # 5651| adpm[0].printed = 0; Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:6659: error[autoVariables]: Address of local auto-variable assigned to a function parameter. # 6657| { # 6658| dpt.next = dpi->templates; # 6659|-> dpi->templates = &dpt; # 6660| dpt.template_decl = dpi->current_template; # 6661| } Error: CPPCHECK_WARNING (CWE-909): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:6666: error[uninitStructMember]: Uninitialized struct member: dpt.next # 6664| # 6665| if (dpi->current_template != NULL) # 6666|-> dpi->templates = dpt.next; # 6667| } # 6668| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cp-demangle.c:6666:20: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined # 6664| # 6665| if (dpi->current_template != NULL) # 6666|-> dpi->templates = dpt.next; # 6667| } # 6668| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cplus-dem.c:196:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller # 194| } # 195| # 196|-> return (ret); # 197| } # 198| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/cplus-dem.c:400:27: warning[deadcode.DeadStores]: Value stored to 'p' is never read # 398| if (strncmp (p, special[k][0], slen) == 0) # 399| { # 400|-> p += slen; # 401| slen = strlen (special[k][1]); # 402| memcpy (d, special[k][1], slen); Error: CPPCHECK_WARNING (CWE-823): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/hashtab.c:187: error[arrayIndexOutOfBounds]: Array 'prime_tab[30]' accessed at index 30, which is out of bounds. # 185| # 186| /* If we've run out of primes, abort. */ # 187|-> if (n > prime_tab[low].prime) # 188| { # 189| fprintf (stderr, "Cannot find prime bigger than %lu\n", n); Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c: scope_hint: In function ‘save_string’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c:110:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘result’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 108| char *result = (char *) malloc (len + 1); # 109| # 110|-> memcpy (result, s, len); # 111| result[len] = 0; # 112| return result; Error: GCC_ANALYZER_WARNING (CWE-127): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c: scope_hint: In function ‘split_directories’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c:192:11: warning[-Wanalyzer-out-of-bounds]: heap-based buffer under-read # └──────────────────────────┘ # ^ # 190| dirs[num_dirs] = NULL; # 191| # 192|-> if (dirs[num_dirs - 1] == NULL) # 193| { # 194| free_split_directories (dirs); Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c:192:26: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value due to array index out of bounds # 190| dirs[num_dirs] = NULL; # 191| # 192|-> if (dirs[num_dirs - 1] == NULL) # 193| { # 194| free_split_directories (dirs); Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c: scope_hint: In function ‘make_relative_prefix_1’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c:274:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘nstore’ # 272| if (endp == startp) # 273| { # 274|-> nstore[0] = '.'; # 275| nstore[1] = DIR_SEPARATOR; # 276| nstore[2] = '\0'; Error: GCC_ANALYZER_WARNING (CWE-688): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/make-relative-prefix.c:280:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘nstore’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 278| else # 279| { # 280|-> memcpy (nstore, startp, endp - startp); # 281| if (! IS_DIR_SEPARATOR (endp[-1])) # 282| { Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/obstack.c:147:33: warning[core.NullDereference]: Access to field 'limit' results in a dereference of a null pointer (loaded from variable 'chunk') # 145| h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents, # 146| alignment - 1); # 147|-> h->chunk_limit = chunk->limit = (char *) chunk + h->chunk_size; # 148| chunk->prev = 0; # 149| /* The initial chunk now contains no empty object. */ Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/obstack.c: scope_hint: In function ‘_obstack_newchunk’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/obstack.c:210:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_chunk’ # 208| (*obstack_alloc_failed_handler)(); # 209| h->chunk = new_chunk; # 210|-> new_chunk->prev = old_chunk; # 211| new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; # 212| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/obstack.c:210:19: warning[core.NullDereference]: Access to field 'prev' results in a dereference of a null pointer (loaded from variable 'new_chunk') # 208| (*obstack_alloc_failed_handler)(); # 209| h->chunk = new_chunk; # 210|-> new_chunk->prev = old_chunk; # 211| new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size; # 212| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:620:13: warning[security.insecureAPI.vfork]: Call to function 'vfork' is insecure as it can lead to denial of service situations in the parent process. Replace calls to vfork with calls to the safer 'posix_spawn' function # 618| for (retries = 0; retries < 4; ++retries) # 619| { # 620|-> pid = vfork (); # 621| if (pid >= 0) # 622| break; Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:636:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[0]’ # 634| } # 635| *err = errno; # 636|-> *errmsg = VFORK_STRING; # 637| return (pid_t) -1; # 638| Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c: scope_hint: In function ‘pex_unix_exec_child’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:636:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipes[1]’ # 634| } # 635| *err = errno; # 636|-> *errmsg = VFORK_STRING; # 637| return (pid_t) -1; # 638| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:643:12: warning[unix.Vfork]: This assignment is prohibited after a successful vfork # 641| { # 642| struct fn_err failed; # 643|-> failed.fn = NULL; # 644| # 645| if (do_pipe) Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:649:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(in, 0)’ # 647| if (!failed.fn && in != STDIN_FILE_NO) # 648| { # 649|-> if (dup2 (in, STDIN_FILE_NO) < 0) # 650| failed.fn = "dup2", failed.err = errno; # 651| else if (close (in) < 0) Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:656:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(out, 1)’ # 654| if (!failed.fn && out != STDOUT_FILE_NO) # 655| { # 656|-> if (dup2 (out, STDOUT_FILE_NO) < 0) # 657| failed.fn = "dup2", failed.err = errno; # 658| else if (close (out) < 0) Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:663:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(errdes, 2)’ # 661| if (!failed.fn && errdes != STDERR_FILE_NO) # 662| { # 663|-> if (dup2 (errdes, STDERR_FILE_NO) < 0) # 664| failed.fn = "dup2", failed.err = errno; # 665| else if (close (errdes) < 0) Error: GCC_ANALYZER_WARNING (CWE-775): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/pex-unix.c:675:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(1, 2)’ # 673| if (!failed.fn && (flags & PEX_STDERR_TO_STDOUT) != 0) # 674| { # 675|-> if (dup2 (STDOUT_FILE_NO, STDERR_FILE_NO) < 0) # 676| failed.fn = "dup2", failed.err = errno; # 677| } Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/regex.c:643: included_from: Included from here. gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/regex.c:5176:34: warning[core.NullDereference]: Dereference of null pointer # 5174| while (range > lim # 5175| && !fastmap[(unsigned char) # 5176|-> translate[(unsigned char) *d++]]) # 5177| range--; # 5178| else Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/regex.c:5179:64: warning[core.NullDereference]: Dereference of null pointer # 5177| range--; # 5178| else # 5179|-> while (range > lim && !fastmap[(unsigned char) *d++]) # 5180| range--; # 5181| Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-mach-o.c: scope_hint: In function ‘simple_object_mach_o_write_segment’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-mach-o.c:1159:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’ # 1157| if (sobj->segment_name != NULL) # 1158| { # 1159|-> index[sect*4+0] = (unsigned int) offset; # 1160| index[sect*4+1] = secsize; # 1161| /* Stash the section name in our table. */ Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-mach-o.c:1210:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘index’ # 1208| created section. */ # 1209| # 1210|-> secsize = (offset - index[0]); # 1211| if (!simple_object_mach_o_write_section_header (sobj, descriptor, # 1212| sechdr_offset, Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-mach-o.c:1217:13: warning[core.NullDereference]: Access to field 'align' results in a dereference of a null pointer (loaded from field 'sections') # 1215| 0 /*secaddr*/, # 1216| secsize, index[0], # 1217|-> sobj->sections->align, # 1218| errmsg, err)) # 1219| return 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-mach-o.c:1256:7: warning[deadcode.DeadStores]: Value stored to 'secaddr' is never read # 1254| # 1255| sechdr_offset += sechdrsize; # 1256|-> secaddr += name_offset; # 1257| offset += name_offset; # 1258| Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object-xcoff.c:844:5: warning[deadcode.DeadStores]: Value stored to 'align' is never read # 842| flags = STYP_DATA; # 843| if (align > 13) # 844|-> align = 13; # 845| if (u64) # 846| set_32 (hdr + offsetof (struct external_scnhdr, u.xcoff64.s_flags), flags); Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:295: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 293| /* Copy over .note.GNU-stack section under the same name if present. */ # 294| else if (strcmp (name, ".note.GNU-stack") == 0) # 295|-> return strcpy (newname, name); # 296| /* Copy over .note.gnu.property section under the same name if present. */ # 297| else if (strcmp (name, ".note.gnu.property") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:298: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 296| /* Copy over .note.gnu.property section under the same name if present. */ # 297| else if (strcmp (name, ".note.gnu.property") == 0) # 298|-> return strcpy (newname, name); # 299| /* Copy over .comment section under the same name if present. Solaris # 300| ld uses them to relax its checking of ELF gABI access rules for Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:303: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 301| COMDAT sections in objects produced by GCC. */ # 302| else if (strcmp (name, ".comment") == 0) # 303|-> return strcpy (newname, name); # 304| /* Copy over .GCC.command.line section under the same name if present. */ # 305| else if (strcmp (name, ".GCC.command.line") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:306: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 304| /* Copy over .GCC.command.line section under the same name if present. */ # 305| else if (strcmp (name, ".GCC.command.line") == 0) # 306|-> return strcpy (newname, name); # 307| /* Copy over .ctf section under the same name if present. */ # 308| else if (strcmp (name, ".ctf") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:309: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 307| /* Copy over .ctf section under the same name if present. */ # 308| else if (strcmp (name, ".ctf") == 0) # 309|-> return strcpy (newname, name); # 310| /* Copy over .BTF section under the same name if present. */ # 311| else if (strcmp (name, ".BTF") == 0) Error: CPPCHECK_WARNING (CWE-562): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/simple-object.c:312: error[returnDanglingLifetime]: Returning pointer to local variable 'newname' that will be invalid when returning. # 310| /* Copy over .BTF section under the same name if present. */ # 311| else if (strcmp (name, ".BTF") == 0) # 312|-> return strcpy (newname, name); # 313| free (newname); # 314| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/strerror.c: scope_hint: In function ‘strtoerrno’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/strerror.c:756:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘error_names’ # 754| for (errnoval = 0; errnoval < num_error_names; errnoval++) # 755| { # 756|-> if ((error_names[errnoval] != NULL) && # 757| (strcmp (name, error_names[errnoval]) == 0)) # 758| { Error: GCC_ANALYZER_WARNING (CWE-476): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/strsignal.c: scope_hint: In function ‘strtosigno’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/strsignal.c:524:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘signal_names’ # 522| for (signo = 0; signo < num_signal_names; signo++) # 523| { # 524|-> if ((signal_names[signo] != NULL) && # 525| (strcmp (name, signal_names[signo]) == 0)) # 526| { Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/vprintf-support.c:52: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 50| va_copy (ap, args); # 51| #else # 52|-> memcpy ((void *) &ap, (void *) &args, sizeof (va_list)); # 53| #endif # 54| Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/vprintf-support.c:64: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 62| { # 63| ++p; # 64|-> total_width += abs (va_arg (ap, int)); # 65| } # 66| else Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/vprintf-support.c:74: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 72| { # 73| ++p; # 74|-> total_width += abs (va_arg (ap, int)); # 75| } # 76| else Error: CPPCHECK_WARNING (CWE-664): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/libiberty/vprintf-support.c:92: error[va_list_usedBeforeStarted]: va_list 'ap' used before va_start() was called. # 90| case 'X': # 91| case 'c': # 92|-> (void) va_arg (ap, int); # 93| break; # 94| case 'f': Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-as.cc:239:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 237| char *buffer; # 238| # 239|-> if (!fseek (stream, 0, SEEK_END)) # 240| { # 241| /* Get the file size. */ Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-as.cc:1231:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1229| if (in != stdin) # 1230| { # 1231|-> fclose (in); # 1232| in = NULL; # 1233| } Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-as.cc:1236:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 1234| if (out != stdout) # 1235| { # 1236|-> fclose (out); # 1237| out = NULL; # 1238| } Error: COMPILER_WARNING (CWE-195): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-ld.cc: scope_hint: In function ‘int main(int, char**)’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-ld.cc:529:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘off_t’ {aka ‘long int’} # 529 | if (read_len != len || ferror (f)) # | ~~~~~~~~~^~~~~~ # 527| size_t read_len = fread (buf, 1, len, f); # 528| buf[len] = '\0'; # 529|-> if (read_len != len || ferror (f)) # 530| { # 531| std::cerr << "error reading " << name << "\n"; Error: COMPILER_WARNING (CWE-195): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-ld.cc:538:15: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘off_t’ {aka ‘long int’} # 538 | if (out != len) # | ~~~~^~~~~~ # 536| f = NULL; # 537| size_t out = fwrite (buf, 1, len, outfile); # 538|-> if (out != len) # 539| { # 540| std::cerr << "error writing to output file\n"; Error: COMPILER_WARNING (CWE-569): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-nm.cc:310:14: warning[-Wparentheses]: unnecessary parentheses in declaration of ‘sorters’ # 310 | static int (*(sorters[2][2])) (const void *, const void *) = # | ^~~~~~~~~~~~~~~ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-nm.cc:310:14: note: remove parentheses # 310 | static int (*(sorters[2][2])) (const void *, const void *) = # | ^~~~~~~~~~~~~~~ # | - - # 308| } # 309| # 310|-> static int (*(sorters[2][2])) (const void *, const void *) = # 311| { # 312| { non_numeric_forward, non_numeric_reverse }, Error: COMPILER_WARNING (CWE-195): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-nm.cc: scope_hint: In function ‘int main(int, char**)’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-nm.cc:594:20: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘off_t’ {aka ‘long int’} # 594 | if (read_len != len || ferror (f)) # | ~~~~~~~~~^~~~~~ # 592| size_t read_len = fread (buf, 1, len, f); # 593| buf[len] = '\0'; # 594|-> if (read_len != len || ferror (f)) # 595| { # 596| std::cerr << "error reading " << name << "\n"; Error: COMPILER_WARNING (CWE-252): gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-run.cc: scope_hint: In function ‘void compile_file(FILE*, void**)’ gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-run.cc:169:9: warning[-Wunused-result]: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ # 169 | fread (program, 1, len, f); # | ~~~~~~^~~~~~~~~~~~~~~~~~~~ # 167| # 168| char *program = new char[len + 1]; # 169|-> fread (program, 1, len, f); # 170| program[len] = '\0'; # 171| int off = 0; Error: CLANG_WARNING: gcc-14.0.1-20240411/nvptx-tools-c5ad8ada3e86d96b10a9d352b7a764f801478ba6/nvptx-run.cc:400:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 398| compile_file (f, &hModule); # 399| # 400|-> fclose (f); # 401| f = NULL; # 402| Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/gcc-nm.cc:203:19: warning[deadcode.DeadStores]: Value stored to 'real_exe_name' during its initialization is never read # 201| if (!exe_name) # 202| { # 203|-> const char *real_exe_name = PERSONALITY; # 204| #ifdef CROSS_DIRECTORY_STRUCTURE # 205| real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/gcc-ranlib.cc:203:19: warning[deadcode.DeadStores]: Value stored to 'real_exe_name' during its initialization is never read # 201| if (!exe_name) # 202| { # 203|-> const char *real_exe_name = PERSONALITY; # 204| #ifdef CROSS_DIRECTORY_STRUCTURE # 205| real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/generic-match-10.cc:62:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 60| tree_vec_same_elem_p (tree t) # 61| { # 62|-> const tree type = TREE_TYPE (t); # 63| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 64| if (TREE_SIDE_EFFECTS (t)) return false; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/gengtype-lex.l: scope_hint: In function ‘int yylex(const char**)’ gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/gengtype-lex.cc:356:15: warning[-Wimplicit-fallthrough=]: this statement may fall through # 356 | */ # | ~~ ^ gcc-14.0.1-20240411/gcc/gengtype-lex.l:119:1: note: in expansion of macro ‘YY_DO_BEFORE_ACTION’ # 119 | "GTY"/{EOID} { return GTY_TOKEN; } # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/gengtype-lex.l:114:1: note: here # 114 | "^" | # | ^~~~~~~~ # 354| /* Done after the current pattern has been matched and before the # 355| * corresponding action - sets up yytext. # 356|-> */ # 357| #define YY_DO_BEFORE_ACTION \ # 358| (yytext_ptr) = yy_bp; \ Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/gengtype-lex.cc:2497: warning[nullPointer]: Possible null pointer dereference: b # 2495| */ # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497|-> # 2498| { # 2499| int oerrno = errno; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/gengtype-lex.cc:2498: warning[nullPointer]: Possible null pointer dereference: b # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497| # 2498|-> { # 2499| int oerrno = errno; # 2500| Error: COMPILER_WARNING (CWE-563): gcc-14.0.1-20240411/gcc/config/gcn/mkoffload.cc:39: included_from: Included from here. gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/multilib.h: scope_hint: At global scope gcc-14.0.1-20240411/obj-offload-amdgcn-amdhsa/gcc/multilib.h:28:20: warning[-Wunused-variable]: ‘multilib_extra’ defined but not used # 28 | static const char *multilib_extra = ""; # | ^~~~~~~~~~~~~~ # 26| }; # 27| # 28|-> static const char *multilib_extra = ""; # 29| # 30| static const char *const multilib_exclusions_raw[] = { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/gcc-nm.cc:203:19: warning[deadcode.DeadStores]: Value stored to 'real_exe_name' during its initialization is never read # 201| if (!exe_name) # 202| { # 203|-> const char *real_exe_name = PERSONALITY; # 204| #ifdef CROSS_DIRECTORY_STRUCTURE # 205| real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/gcc-ranlib.cc:203:19: warning[deadcode.DeadStores]: Value stored to 'real_exe_name' during its initialization is never read # 201| if (!exe_name) # 202| { # 203|-> const char *real_exe_name = PERSONALITY; # 204| #ifdef CROSS_DIRECTORY_STRUCTURE # 205| real_exe_name = concat (target_machine, "-", PERSONALITY, NULL); Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/generic-match-10.cc:62:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 60| tree_vec_same_elem_p (tree t) # 61| { # 62|-> const tree type = TREE_TYPE (t); # 63| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 64| if (TREE_SIDE_EFFECTS (t)) return false; Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/gengtype-lex.l: scope_hint: In function ‘int yylex(const char**)’ gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/gengtype-lex.cc:356:15: warning[-Wimplicit-fallthrough=]: this statement may fall through # 356 | */ # | ~~ ^ gcc-14.0.1-20240411/gcc/gengtype-lex.l:119:1: note: in expansion of macro ‘YY_DO_BEFORE_ACTION’ # 119 | "GTY"/{EOID} { return GTY_TOKEN; } # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/gengtype-lex.l:114:1: note: here # 114 | "^" | # | ^~~~~~~~ # 354| /* Done after the current pattern has been matched and before the # 355| * corresponding action - sets up yytext. # 356|-> */ # 357| #define YY_DO_BEFORE_ACTION \ # 358| (yytext_ptr) = yy_bp; \ Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/gengtype-lex.cc:2497: warning[nullPointer]: Possible null pointer dereference: b # 2495| */ # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497|-> # 2498| { # 2499| int oerrno = errno; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/gengtype-lex.cc:2498: warning[nullPointer]: Possible null pointer dereference: b # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497| # 2498|-> { # 2499| int oerrno = errno; # 2500| Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:447: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 445| MODE_MASK (2*BITS_PER_UNIT), /* HI */ # 446| MODE_MASK (4*BITS_PER_UNIT), /* SI */ # 447|-> MODE_MASK (8*BITS_PER_UNIT), /* DI */ # 448| MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 449| MODE_MASK (1*BITS_PER_UNIT), /* QQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:448: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 446| MODE_MASK (4*BITS_PER_UNIT), /* SI */ # 447| MODE_MASK (8*BITS_PER_UNIT), /* DI */ # 448|-> MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 449| MODE_MASK (1*BITS_PER_UNIT), /* QQ */ # 450| MODE_MASK (2*BITS_PER_UNIT), /* HQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:452: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 450| MODE_MASK (2*BITS_PER_UNIT), /* HQ */ # 451| MODE_MASK (4*BITS_PER_UNIT), /* SQ */ # 452|-> MODE_MASK (8*BITS_PER_UNIT), /* DQ */ # 453| MODE_MASK (16*BITS_PER_UNIT), /* TQ */ # 454| MODE_MASK (1*BITS_PER_UNIT), /* UQQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:453: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 451| MODE_MASK (4*BITS_PER_UNIT), /* SQ */ # 452| MODE_MASK (8*BITS_PER_UNIT), /* DQ */ # 453|-> MODE_MASK (16*BITS_PER_UNIT), /* TQ */ # 454| MODE_MASK (1*BITS_PER_UNIT), /* UQQ */ # 455| MODE_MASK (2*BITS_PER_UNIT), /* UHQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:457: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 455| MODE_MASK (2*BITS_PER_UNIT), /* UHQ */ # 456| MODE_MASK (4*BITS_PER_UNIT), /* USQ */ # 457|-> MODE_MASK (8*BITS_PER_UNIT), /* UDQ */ # 458| MODE_MASK (16*BITS_PER_UNIT), /* UTQ */ # 459| MODE_MASK (2*BITS_PER_UNIT), /* HA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:458: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 456| MODE_MASK (4*BITS_PER_UNIT), /* USQ */ # 457| MODE_MASK (8*BITS_PER_UNIT), /* UDQ */ # 458|-> MODE_MASK (16*BITS_PER_UNIT), /* UTQ */ # 459| MODE_MASK (2*BITS_PER_UNIT), /* HA */ # 460| MODE_MASK (4*BITS_PER_UNIT), /* SA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:461: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 459| MODE_MASK (2*BITS_PER_UNIT), /* HA */ # 460| MODE_MASK (4*BITS_PER_UNIT), /* SA */ # 461|-> MODE_MASK (8*BITS_PER_UNIT), /* DA */ # 462| MODE_MASK (16*BITS_PER_UNIT), /* TA */ # 463| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:462: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 460| MODE_MASK (4*BITS_PER_UNIT), /* SA */ # 461| MODE_MASK (8*BITS_PER_UNIT), /* DA */ # 462|-> MODE_MASK (16*BITS_PER_UNIT), /* TA */ # 463| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ # 464| MODE_MASK (4*BITS_PER_UNIT), /* USA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:465: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 463| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ # 464| MODE_MASK (4*BITS_PER_UNIT), /* USA */ # 465|-> MODE_MASK (8*BITS_PER_UNIT), /* UDA */ # 466| MODE_MASK (16*BITS_PER_UNIT), /* UTA */ # 467| MODE_MASK (2*BITS_PER_UNIT), /* HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:466: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 464| MODE_MASK (4*BITS_PER_UNIT), /* USA */ # 465| MODE_MASK (8*BITS_PER_UNIT), /* UDA */ # 466|-> MODE_MASK (16*BITS_PER_UNIT), /* UTA */ # 467| MODE_MASK (2*BITS_PER_UNIT), /* HF */ # 468| MODE_MASK (4*BITS_PER_UNIT), /* SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:469: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 467| MODE_MASK (2*BITS_PER_UNIT), /* HF */ # 468| MODE_MASK (4*BITS_PER_UNIT), /* SF */ # 469|-> MODE_MASK (8*BITS_PER_UNIT), /* DF */ # 470| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 471| MODE_MASK (8*BITS_PER_UNIT), /* DD */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:471: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 469| MODE_MASK (8*BITS_PER_UNIT), /* DF */ # 470| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 471|-> MODE_MASK (8*BITS_PER_UNIT), /* DD */ # 472| MODE_MASK (16*BITS_PER_UNIT), /* TD */ # 473| MODE_MASK (2*BITS_PER_UNIT), /* CQI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:472: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 470| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 471| MODE_MASK (8*BITS_PER_UNIT), /* DD */ # 472|-> MODE_MASK (16*BITS_PER_UNIT), /* TD */ # 473| MODE_MASK (2*BITS_PER_UNIT), /* CQI */ # 474| MODE_MASK (4*BITS_PER_UNIT), /* CHI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:475: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 473| MODE_MASK (2*BITS_PER_UNIT), /* CQI */ # 474| MODE_MASK (4*BITS_PER_UNIT), /* CHI */ # 475|-> MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 476| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 477| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:476: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 474| MODE_MASK (4*BITS_PER_UNIT), /* CHI */ # 475| MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 476|-> MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 477| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 478| MODE_MASK (4*BITS_PER_UNIT), /* HC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:477: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 475| MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 476| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 477|-> MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 478| MODE_MASK (4*BITS_PER_UNIT), /* HC */ # 479| MODE_MASK (8*BITS_PER_UNIT), /* SC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:479: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 477| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 478| MODE_MASK (4*BITS_PER_UNIT), /* HC */ # 479|-> MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 480| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 481| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:480: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 478| MODE_MASK (4*BITS_PER_UNIT), /* HC */ # 479| MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 480|-> MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 481| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 482| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:481: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 479| MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 480| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 481|-> MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 482| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 483| #undef MODE_MASK Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-offload-nvptx-none/gcc/insn-modes.cc:482: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 480| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 481| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 482|-> MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 483| #undef MODE_MASK # 484| }; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-1.cc:12:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 10| tree_min_value (tree t) # 11| { # 12|-> const tree type = TREE_TYPE (t); # 13| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 14| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-1.cc:40:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 38| tree_max_value (tree t) # 39| { # 40|-> const tree type = TREE_TYPE (t); # 41| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 42| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-1.cc:2019:17: warning[deadcode.DeadStores]: Value stored to 'code' during its initialization is never read # 2017| tree ty1 = TREE_TYPE (arg0); # 2018| tree ty2 = TREE_TYPE (arg1); # 2019|-> enum tree_code code = TREE_CODE (itype); # 2020| if (FLOAT_TYPE_P (ty1) # 2021| && FLOAT_TYPE_P (ty2) Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-10.cc:62:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 60| tree_vec_same_elem_p (tree t) # 61| { # 62|-> const tree type = TREE_TYPE (t); # 63| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 64| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-2.cc:12:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 10| tree_with_certain_nonzero_bits2 (tree t, tree *res_ops) # 11| { # 12|-> const tree type = TREE_TYPE (t); # 13| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 14| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-2.cc:59:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 57| tree_float_value_p (tree t) # 58| { # 59|-> const tree type = TREE_TYPE (t); # 60| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 61| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-2.cc:1469:7: warning[deadcode.DeadStores]: Value stored to 'type0' during its initialization is never read # 1467| { # 1468| { # 1469|-> tree type0 = TREE_TYPE (captures[1]); # 1470| tree stype = signed_type_for (TREE_TYPE (captures[1])); # 1471| if (integer_zerop (captures[2])) Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-2.cc:2218:7: warning[deadcode.DeadStores]: Value stored to 'arg00' during its initialization is never read # 2216| { # 2217| prec = TYPE_PRECISION (TREE_TYPE (captures[2])); # 2218|-> tree arg00 = captures[3]; # 2219| if (captures[2] != captures[3] # 2220| && TYPE_UNSIGNED (TREE_TYPE (captures[3]))) Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-3.cc:12:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 10| tree_with_possible_nonzero_bits2 (tree t, tree *res_ops) # 11| { # 12|-> const tree type = TREE_TYPE (t); # 13| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 14| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-3.cc:64:14: warning[deadcode.DeadStores]: Value stored to 'type' during its initialization is never read # 62| tree_ctz_table_index (tree t, tree *res_ops) # 63| { # 64|-> const tree type = TREE_TYPE (t); # 65| const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 66| if (TREE_SIDE_EFFECTS (t)) return false; Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-3.cc:1928:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 1926| const enum tree_code ARG_UNUSED (bitop)) # 1927| { # 1928|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 1929| if (0 # 1930| && TREE_CODE (captures[3]) != INTEGER_CST Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-3.cc:2065:17: warning[deadcode.DeadStores]: Value stored to 'code' during its initialization is never read # 2063| tree ty1 = TREE_TYPE (arg0); # 2064| tree ty2 = TREE_TYPE (arg1); # 2065|-> enum tree_code code = TREE_CODE (itype); # 2066| if (FLOAT_TYPE_P (ty1) # 2067| && FLOAT_TYPE_P (ty2) Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-7.cc:1296:5: warning[core.NullDereference]: Dereference of null pointer # 1294| ? gimple_assign_rhs1 (SSA_NAME_DEF_STMT (captures[0])) : captures[0]); # 1295| if (SSA_NAME_IS_DEFAULT_DEF (captures[1]) # 1296|-> && TREE_CODE (SSA_NAME_VAR (captures[1])) == PARM_DECL # 1297| && (base = get_base_address (TREE_OPERAND (addr, 0))) # 1298| && TREE_CODE (base) == VAR_DECL Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-7.cc:7765:7: warning[deadcode.DeadStores]: Value stored to 'stype' during its initialization is never read # 7763| { # 7764| { # 7765|-> tree stype = TREE_TYPE (captures[2]); # 7766| tree bt = truth_type_for (type); # 7767| tree zeros = build_zero_cst (type); Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/generic-match-7.cc:7846:7: warning[deadcode.DeadStores]: Value stored to 'stype' during its initialization is never read # 7844| { # 7845| { # 7846|-> tree stype = TREE_TYPE (captures[2]); # 7847| tree bt = truth_type_for (type); # 7848| tree zeros = build_zero_cst (type); Error: COMPILER_WARNING: gcc-14.0.1-20240411/gcc/gengtype-lex.l: scope_hint: In function ‘int yylex(const char**)’ gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gengtype-lex.cc:356:15: warning[-Wimplicit-fallthrough=]: this statement may fall through # 356 | */ # | ~~ ^ gcc-14.0.1-20240411/gcc/gengtype-lex.l:119:1: note: in expansion of macro ‘YY_DO_BEFORE_ACTION’ # 119 | "GTY"/{EOID} { return GTY_TOKEN; } # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc-14.0.1-20240411/gcc/gengtype-lex.l:114:1: note: here # 114 | "^" | # | ^~~~~~~~ # 354| /* Done after the current pattern has been matched and before the # 355| * corresponding action - sets up yytext. # 356|-> */ # 357| #define YY_DO_BEFORE_ACTION \ # 358| (yytext_ptr) = yy_bp; \ Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gengtype-lex.cc:2497: warning[nullPointer]: Possible null pointer dereference: b # 2495| */ # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497|-> # 2498| { # 2499| int oerrno = errno; Error: CPPCHECK_WARNING (CWE-476): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gengtype-lex.cc:2498: warning[nullPointer]: Possible null pointer dereference: b # 2496| static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) # 2497| # 2498|-> { # 2499| int oerrno = errno; # 2500| Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5466:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5464| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5465| { # 5466|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5467| switch (TREE_CODE (_p0)) # 5468| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5501:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5499| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5500| { # 5501|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5502| switch (TREE_CODE (_p0)) # 5503| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5536:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5534| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5535| { # 5536|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5537| switch (TREE_CODE (_p0)) # 5538| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5579:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5577| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5578| { # 5579|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5580| switch (TREE_CODE (_p0)) # 5581| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5630:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5628| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5629| { # 5630|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5631| switch (TREE_CODE (_p0)) # 5632| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5681:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5679| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5680| { # 5681|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5682| switch (TREE_CODE (_p0)) # 5683| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5724:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5722| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5723| { # 5724|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5725| switch (TREE_CODE (_p0)) # 5726| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5767:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5765| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5766| { # 5767|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5768| switch (TREE_CODE (_p0)) # 5769| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5837:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5835| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5836| { # 5837|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5838| switch (TREE_CODE (_p0)) # 5839| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5880:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5878| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5879| { # 5880|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5881| switch (TREE_CODE (_p0)) # 5882| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:5946:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 5944| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 5945| { # 5946|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 5947| switch (TREE_CODE (_p0)) # 5948| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6004:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6002| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6003| { # 6004|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6005| switch (TREE_CODE (_p0)) # 6006| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6049:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6047| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6048| { # 6049|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6050| switch (TREE_CODE (_p0)) # 6051| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6099:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6097| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6098| { # 6099|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6100| if (integer_valued_real_p (_p0)) # 6101| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6121:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6119| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6120| { # 6121|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6122| if (integer_valued_real_p (_p0)) # 6123| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6143:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6141| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6142| { # 6143|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6144| switch (TREE_CODE (_p0)) # 6145| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6177:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6175| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6176| { # 6177|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6178| switch (TREE_CODE (_p0)) # 6179| { Error: CLANG_WARNING: gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/gimple-match-9.cc:6388:14: warning[deadcode.DeadStores]: Value stored to 'debug_dump' during its initialization is never read # 6386| code_helper ARG_UNUSED (code), tree ARG_UNUSED (type), tree _p0) # 6387| { # 6388|-> const bool debug_dump = dump_file && (dump_flags & TDF_FOLDING); # 6389| switch (TREE_CODE (_p0)) # 6390| { Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1241: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1239| MODE_MASK (2*BITS_PER_UNIT), /* HI */ # 1240| MODE_MASK (4*BITS_PER_UNIT), /* SI */ # 1241|-> MODE_MASK (8*BITS_PER_UNIT), /* DI */ # 1242| MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 1243| MODE_MASK (32*BITS_PER_UNIT), /* OI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1242: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1240| MODE_MASK (4*BITS_PER_UNIT), /* SI */ # 1241| MODE_MASK (8*BITS_PER_UNIT), /* DI */ # 1242|-> MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 1243| MODE_MASK (32*BITS_PER_UNIT), /* OI */ # 1244| MODE_MASK (64*BITS_PER_UNIT), /* XI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1243: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1241| MODE_MASK (8*BITS_PER_UNIT), /* DI */ # 1242| MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 1243|-> MODE_MASK (32*BITS_PER_UNIT), /* OI */ # 1244| MODE_MASK (64*BITS_PER_UNIT), /* XI */ # 1245| MODE_MASK (16), /* P2QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1244: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1242| MODE_MASK (16*BITS_PER_UNIT), /* TI */ # 1243| MODE_MASK (32*BITS_PER_UNIT), /* OI */ # 1244|-> MODE_MASK (64*BITS_PER_UNIT), /* XI */ # 1245| MODE_MASK (16), /* P2QI */ # 1246| MODE_MASK (32), /* P2HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1247: error[shiftTooManyBits]: Shifting 64-bit value by 160 bits is undefined behaviour # 1245| MODE_MASK (16), /* P2QI */ # 1246| MODE_MASK (32), /* P2HI */ # 1247|-> MODE_MASK (160), /* POI */ # 1248| MODE_MASK (1*BITS_PER_UNIT), /* QQ */ # 1249| MODE_MASK (2*BITS_PER_UNIT), /* HQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1251: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1249| MODE_MASK (2*BITS_PER_UNIT), /* HQ */ # 1250| MODE_MASK (4*BITS_PER_UNIT), /* SQ */ # 1251|-> MODE_MASK (8*BITS_PER_UNIT), /* DQ */ # 1252| MODE_MASK (16*BITS_PER_UNIT), /* TQ */ # 1253| MODE_MASK (1*BITS_PER_UNIT), /* UQQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1252: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1250| MODE_MASK (4*BITS_PER_UNIT), /* SQ */ # 1251| MODE_MASK (8*BITS_PER_UNIT), /* DQ */ # 1252|-> MODE_MASK (16*BITS_PER_UNIT), /* TQ */ # 1253| MODE_MASK (1*BITS_PER_UNIT), /* UQQ */ # 1254| MODE_MASK (2*BITS_PER_UNIT), /* UHQ */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1256: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1254| MODE_MASK (2*BITS_PER_UNIT), /* UHQ */ # 1255| MODE_MASK (4*BITS_PER_UNIT), /* USQ */ # 1256|-> MODE_MASK (8*BITS_PER_UNIT), /* UDQ */ # 1257| MODE_MASK (16*BITS_PER_UNIT), /* UTQ */ # 1258| MODE_MASK (2*BITS_PER_UNIT), /* HA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1257: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1255| MODE_MASK (4*BITS_PER_UNIT), /* USQ */ # 1256| MODE_MASK (8*BITS_PER_UNIT), /* UDQ */ # 1257|-> MODE_MASK (16*BITS_PER_UNIT), /* UTQ */ # 1258| MODE_MASK (2*BITS_PER_UNIT), /* HA */ # 1259| MODE_MASK (4*BITS_PER_UNIT), /* SA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1260: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1258| MODE_MASK (2*BITS_PER_UNIT), /* HA */ # 1259| MODE_MASK (4*BITS_PER_UNIT), /* SA */ # 1260|-> MODE_MASK (8*BITS_PER_UNIT), /* DA */ # 1261| MODE_MASK (16*BITS_PER_UNIT), /* TA */ # 1262| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1261: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1259| MODE_MASK (4*BITS_PER_UNIT), /* SA */ # 1260| MODE_MASK (8*BITS_PER_UNIT), /* DA */ # 1261|-> MODE_MASK (16*BITS_PER_UNIT), /* TA */ # 1262| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ # 1263| MODE_MASK (4*BITS_PER_UNIT), /* USA */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1264: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1262| MODE_MASK (2*BITS_PER_UNIT), /* UHA */ # 1263| MODE_MASK (4*BITS_PER_UNIT), /* USA */ # 1264|-> MODE_MASK (8*BITS_PER_UNIT), /* UDA */ # 1265| MODE_MASK (16*BITS_PER_UNIT), /* UTA */ # 1266| MODE_MASK (2*BITS_PER_UNIT), /* HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1265: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1263| MODE_MASK (4*BITS_PER_UNIT), /* USA */ # 1264| MODE_MASK (8*BITS_PER_UNIT), /* UDA */ # 1265|-> MODE_MASK (16*BITS_PER_UNIT), /* UTA */ # 1266| MODE_MASK (2*BITS_PER_UNIT), /* HF */ # 1267| MODE_MASK (2*BITS_PER_UNIT), /* BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1269: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1267| MODE_MASK (2*BITS_PER_UNIT), /* BF */ # 1268| MODE_MASK (4*BITS_PER_UNIT), /* SF */ # 1269|-> MODE_MASK (8*BITS_PER_UNIT), /* DF */ # 1270| MODE_MASK (80), /* XF */ # 1271| MODE_MASK (16*BITS_PER_UNIT), /* TF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1270: error[shiftTooManyBits]: Shifting 64-bit value by 80 bits is undefined behaviour # 1268| MODE_MASK (4*BITS_PER_UNIT), /* SF */ # 1269| MODE_MASK (8*BITS_PER_UNIT), /* DF */ # 1270|-> MODE_MASK (80), /* XF */ # 1271| MODE_MASK (16*BITS_PER_UNIT), /* TF */ # 1272| MODE_MASK (4*BITS_PER_UNIT), /* SD */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1271: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1269| MODE_MASK (8*BITS_PER_UNIT), /* DF */ # 1270| MODE_MASK (80), /* XF */ # 1271|-> MODE_MASK (16*BITS_PER_UNIT), /* TF */ # 1272| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 1273| MODE_MASK (8*BITS_PER_UNIT), /* DD */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1273: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1271| MODE_MASK (16*BITS_PER_UNIT), /* TF */ # 1272| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 1273|-> MODE_MASK (8*BITS_PER_UNIT), /* DD */ # 1274| MODE_MASK (16*BITS_PER_UNIT), /* TD */ # 1275| MODE_MASK (2*BITS_PER_UNIT), /* CQI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1274: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1272| MODE_MASK (4*BITS_PER_UNIT), /* SD */ # 1273| MODE_MASK (8*BITS_PER_UNIT), /* DD */ # 1274|-> MODE_MASK (16*BITS_PER_UNIT), /* TD */ # 1275| MODE_MASK (2*BITS_PER_UNIT), /* CQI */ # 1276| MODE_MASK (32), /* CP2QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1278: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1276| MODE_MASK (32), /* CP2QI */ # 1277| MODE_MASK (4*BITS_PER_UNIT), /* CHI */ # 1278|-> MODE_MASK (64), /* CP2HI */ # 1279| MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 1280| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1279: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1277| MODE_MASK (4*BITS_PER_UNIT), /* CHI */ # 1278| MODE_MASK (64), /* CP2HI */ # 1279|-> MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 1280| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 1281| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1280: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1278| MODE_MASK (64), /* CP2HI */ # 1279| MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 1280|-> MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 1281| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 1282| MODE_MASK (320), /* CPOI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1281: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1279| MODE_MASK (8*BITS_PER_UNIT), /* CSI */ # 1280| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 1281|-> MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 1282| MODE_MASK (320), /* CPOI */ # 1283| MODE_MASK (64*BITS_PER_UNIT), /* COI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1282: error[shiftTooManyBits]: Shifting 64-bit value by 320 bits is undefined behaviour # 1280| MODE_MASK (16*BITS_PER_UNIT), /* CDI */ # 1281| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 1282|-> MODE_MASK (320), /* CPOI */ # 1283| MODE_MASK (64*BITS_PER_UNIT), /* COI */ # 1284| MODE_MASK (128*BITS_PER_UNIT), /* CXI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1283: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1281| MODE_MASK (32*BITS_PER_UNIT), /* CTI */ # 1282| MODE_MASK (320), /* CPOI */ # 1283|-> MODE_MASK (64*BITS_PER_UNIT), /* COI */ # 1284| MODE_MASK (128*BITS_PER_UNIT), /* CXI */ # 1285| MODE_MASK (4*BITS_PER_UNIT), /* BC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1284: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1282| MODE_MASK (320), /* CPOI */ # 1283| MODE_MASK (64*BITS_PER_UNIT), /* COI */ # 1284|-> MODE_MASK (128*BITS_PER_UNIT), /* CXI */ # 1285| MODE_MASK (4*BITS_PER_UNIT), /* BC */ # 1286| MODE_MASK (4*BITS_PER_UNIT), /* HC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1287: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1285| MODE_MASK (4*BITS_PER_UNIT), /* BC */ # 1286| MODE_MASK (4*BITS_PER_UNIT), /* HC */ # 1287|-> MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 1288| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 1289| MODE_MASK (160), /* XC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1288: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1286| MODE_MASK (4*BITS_PER_UNIT), /* HC */ # 1287| MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 1288|-> MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 1289| MODE_MASK (160), /* XC */ # 1290| MODE_MASK (32*BITS_PER_UNIT), /* TC */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1289: error[shiftTooManyBits]: Shifting 64-bit value by 160 bits is undefined behaviour # 1287| MODE_MASK (8*BITS_PER_UNIT), /* SC */ # 1288| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 1289|-> MODE_MASK (160), /* XC */ # 1290| MODE_MASK (32*BITS_PER_UNIT), /* TC */ # 1291| MODE_MASK (2*BITS_PER_UNIT), /* V2QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1290: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1288| MODE_MASK (16*BITS_PER_UNIT), /* DC */ # 1289| MODE_MASK (160), /* XC */ # 1290|-> MODE_MASK (32*BITS_PER_UNIT), /* TC */ # 1291| MODE_MASK (2*BITS_PER_UNIT), /* V2QI */ # 1292| MODE_MASK (4*BITS_PER_UNIT), /* V4QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1295: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1293| MODE_MASK (4*BITS_PER_UNIT), /* V2HI */ # 1294| MODE_MASK (4*BITS_PER_UNIT), /* V1SI */ # 1295|-> MODE_MASK (8*BITS_PER_UNIT), /* V8QI */ # 1296| MODE_MASK (8*BITS_PER_UNIT), /* V4HI */ # 1297| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1296: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1294| MODE_MASK (4*BITS_PER_UNIT), /* V1SI */ # 1295| MODE_MASK (8*BITS_PER_UNIT), /* V8QI */ # 1296|-> MODE_MASK (8*BITS_PER_UNIT), /* V4HI */ # 1297| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 1298| MODE_MASK (8*BITS_PER_UNIT), /* V1DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1297: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1295| MODE_MASK (8*BITS_PER_UNIT), /* V8QI */ # 1296| MODE_MASK (8*BITS_PER_UNIT), /* V4HI */ # 1297|-> MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 1298| MODE_MASK (8*BITS_PER_UNIT), /* V1DI */ # 1299| MODE_MASK (12*BITS_PER_UNIT), /* V12QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1298: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1296| MODE_MASK (8*BITS_PER_UNIT), /* V4HI */ # 1297| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 1298|-> MODE_MASK (8*BITS_PER_UNIT), /* V1DI */ # 1299| MODE_MASK (12*BITS_PER_UNIT), /* V12QI */ # 1300| MODE_MASK (12*BITS_PER_UNIT), /* V6HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1299: error[shiftTooManyBits]: Shifting 64-bit value by 96 bits is undefined behaviour # 1297| MODE_MASK (8*BITS_PER_UNIT), /* V2SI */ # 1298| MODE_MASK (8*BITS_PER_UNIT), /* V1DI */ # 1299|-> MODE_MASK (12*BITS_PER_UNIT), /* V12QI */ # 1300| MODE_MASK (12*BITS_PER_UNIT), /* V6HI */ # 1301| MODE_MASK (14*BITS_PER_UNIT), /* V14QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1300: error[shiftTooManyBits]: Shifting 64-bit value by 96 bits is undefined behaviour # 1298| MODE_MASK (8*BITS_PER_UNIT), /* V1DI */ # 1299| MODE_MASK (12*BITS_PER_UNIT), /* V12QI */ # 1300|-> MODE_MASK (12*BITS_PER_UNIT), /* V6HI */ # 1301| MODE_MASK (14*BITS_PER_UNIT), /* V14QI */ # 1302| MODE_MASK (16*BITS_PER_UNIT), /* V16QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1301: error[shiftTooManyBits]: Shifting 64-bit value by 112 bits is undefined behaviour # 1299| MODE_MASK (12*BITS_PER_UNIT), /* V12QI */ # 1300| MODE_MASK (12*BITS_PER_UNIT), /* V6HI */ # 1301|-> MODE_MASK (14*BITS_PER_UNIT), /* V14QI */ # 1302| MODE_MASK (16*BITS_PER_UNIT), /* V16QI */ # 1303| MODE_MASK (16*BITS_PER_UNIT), /* V8HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1302: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1300| MODE_MASK (12*BITS_PER_UNIT), /* V6HI */ # 1301| MODE_MASK (14*BITS_PER_UNIT), /* V14QI */ # 1302|-> MODE_MASK (16*BITS_PER_UNIT), /* V16QI */ # 1303| MODE_MASK (16*BITS_PER_UNIT), /* V8HI */ # 1304| MODE_MASK (16*BITS_PER_UNIT), /* V4SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1303: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1301| MODE_MASK (14*BITS_PER_UNIT), /* V14QI */ # 1302| MODE_MASK (16*BITS_PER_UNIT), /* V16QI */ # 1303|-> MODE_MASK (16*BITS_PER_UNIT), /* V8HI */ # 1304| MODE_MASK (16*BITS_PER_UNIT), /* V4SI */ # 1305| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1304: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1302| MODE_MASK (16*BITS_PER_UNIT), /* V16QI */ # 1303| MODE_MASK (16*BITS_PER_UNIT), /* V8HI */ # 1304|-> MODE_MASK (16*BITS_PER_UNIT), /* V4SI */ # 1305| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 1306| MODE_MASK (16*BITS_PER_UNIT), /* V1TI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1305: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1303| MODE_MASK (16*BITS_PER_UNIT), /* V8HI */ # 1304| MODE_MASK (16*BITS_PER_UNIT), /* V4SI */ # 1305|-> MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 1306| MODE_MASK (16*BITS_PER_UNIT), /* V1TI */ # 1307| MODE_MASK (32*BITS_PER_UNIT), /* V32QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1306: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1304| MODE_MASK (16*BITS_PER_UNIT), /* V4SI */ # 1305| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 1306|-> MODE_MASK (16*BITS_PER_UNIT), /* V1TI */ # 1307| MODE_MASK (32*BITS_PER_UNIT), /* V32QI */ # 1308| MODE_MASK (32*BITS_PER_UNIT), /* V16HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1307: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1305| MODE_MASK (16*BITS_PER_UNIT), /* V2DI */ # 1306| MODE_MASK (16*BITS_PER_UNIT), /* V1TI */ # 1307|-> MODE_MASK (32*BITS_PER_UNIT), /* V32QI */ # 1308| MODE_MASK (32*BITS_PER_UNIT), /* V16HI */ # 1309| MODE_MASK (32*BITS_PER_UNIT), /* V8SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1308: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1306| MODE_MASK (16*BITS_PER_UNIT), /* V1TI */ # 1307| MODE_MASK (32*BITS_PER_UNIT), /* V32QI */ # 1308|-> MODE_MASK (32*BITS_PER_UNIT), /* V16HI */ # 1309| MODE_MASK (32*BITS_PER_UNIT), /* V8SI */ # 1310| MODE_MASK (32*BITS_PER_UNIT), /* V4DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1309: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1307| MODE_MASK (32*BITS_PER_UNIT), /* V32QI */ # 1308| MODE_MASK (32*BITS_PER_UNIT), /* V16HI */ # 1309|-> MODE_MASK (32*BITS_PER_UNIT), /* V8SI */ # 1310| MODE_MASK (32*BITS_PER_UNIT), /* V4DI */ # 1311| MODE_MASK (32*BITS_PER_UNIT), /* V2TI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1310: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1308| MODE_MASK (32*BITS_PER_UNIT), /* V16HI */ # 1309| MODE_MASK (32*BITS_PER_UNIT), /* V8SI */ # 1310|-> MODE_MASK (32*BITS_PER_UNIT), /* V4DI */ # 1311| MODE_MASK (32*BITS_PER_UNIT), /* V2TI */ # 1312| MODE_MASK (64*BITS_PER_UNIT), /* V64QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1311: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1309| MODE_MASK (32*BITS_PER_UNIT), /* V8SI */ # 1310| MODE_MASK (32*BITS_PER_UNIT), /* V4DI */ # 1311|-> MODE_MASK (32*BITS_PER_UNIT), /* V2TI */ # 1312| MODE_MASK (64*BITS_PER_UNIT), /* V64QI */ # 1313| MODE_MASK (64*BITS_PER_UNIT), /* V32HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1312: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1310| MODE_MASK (32*BITS_PER_UNIT), /* V4DI */ # 1311| MODE_MASK (32*BITS_PER_UNIT), /* V2TI */ # 1312|-> MODE_MASK (64*BITS_PER_UNIT), /* V64QI */ # 1313| MODE_MASK (64*BITS_PER_UNIT), /* V32HI */ # 1314| MODE_MASK (64*BITS_PER_UNIT), /* V16SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1313: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1311| MODE_MASK (32*BITS_PER_UNIT), /* V2TI */ # 1312| MODE_MASK (64*BITS_PER_UNIT), /* V64QI */ # 1313|-> MODE_MASK (64*BITS_PER_UNIT), /* V32HI */ # 1314| MODE_MASK (64*BITS_PER_UNIT), /* V16SI */ # 1315| MODE_MASK (64*BITS_PER_UNIT), /* V8DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1314: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1312| MODE_MASK (64*BITS_PER_UNIT), /* V64QI */ # 1313| MODE_MASK (64*BITS_PER_UNIT), /* V32HI */ # 1314|-> MODE_MASK (64*BITS_PER_UNIT), /* V16SI */ # 1315| MODE_MASK (64*BITS_PER_UNIT), /* V8DI */ # 1316| MODE_MASK (64*BITS_PER_UNIT), /* V4TI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1315: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1313| MODE_MASK (64*BITS_PER_UNIT), /* V32HI */ # 1314| MODE_MASK (64*BITS_PER_UNIT), /* V16SI */ # 1315|-> MODE_MASK (64*BITS_PER_UNIT), /* V8DI */ # 1316| MODE_MASK (64*BITS_PER_UNIT), /* V4TI */ # 1317| MODE_MASK (128*BITS_PER_UNIT), /* V128QI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1316: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1314| MODE_MASK (64*BITS_PER_UNIT), /* V16SI */ # 1315| MODE_MASK (64*BITS_PER_UNIT), /* V8DI */ # 1316|-> MODE_MASK (64*BITS_PER_UNIT), /* V4TI */ # 1317| MODE_MASK (128*BITS_PER_UNIT), /* V128QI */ # 1318| MODE_MASK (128*BITS_PER_UNIT), /* V64HI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1317: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1315| MODE_MASK (64*BITS_PER_UNIT), /* V8DI */ # 1316| MODE_MASK (64*BITS_PER_UNIT), /* V4TI */ # 1317|-> MODE_MASK (128*BITS_PER_UNIT), /* V128QI */ # 1318| MODE_MASK (128*BITS_PER_UNIT), /* V64HI */ # 1319| MODE_MASK (128*BITS_PER_UNIT), /* V32SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1318: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1316| MODE_MASK (64*BITS_PER_UNIT), /* V4TI */ # 1317| MODE_MASK (128*BITS_PER_UNIT), /* V128QI */ # 1318|-> MODE_MASK (128*BITS_PER_UNIT), /* V64HI */ # 1319| MODE_MASK (128*BITS_PER_UNIT), /* V32SI */ # 1320| MODE_MASK (128*BITS_PER_UNIT), /* V16DI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1319: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1317| MODE_MASK (128*BITS_PER_UNIT), /* V128QI */ # 1318| MODE_MASK (128*BITS_PER_UNIT), /* V64HI */ # 1319|-> MODE_MASK (128*BITS_PER_UNIT), /* V32SI */ # 1320| MODE_MASK (128*BITS_PER_UNIT), /* V16DI */ # 1321| MODE_MASK (128*BITS_PER_UNIT), /* V8TI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1320: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1318| MODE_MASK (128*BITS_PER_UNIT), /* V64HI */ # 1319| MODE_MASK (128*BITS_PER_UNIT), /* V32SI */ # 1320|-> MODE_MASK (128*BITS_PER_UNIT), /* V16DI */ # 1321| MODE_MASK (128*BITS_PER_UNIT), /* V8TI */ # 1322| MODE_MASK (256*BITS_PER_UNIT), /* V64SI */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1321: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1319| MODE_MASK (128*BITS_PER_UNIT), /* V32SI */ # 1320| MODE_MASK (128*BITS_PER_UNIT), /* V16DI */ # 1321|-> MODE_MASK (128*BITS_PER_UNIT), /* V8TI */ # 1322| MODE_MASK (256*BITS_PER_UNIT), /* V64SI */ # 1323| MODE_MASK (4*BITS_PER_UNIT), /* V2HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1322: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1320| MODE_MASK (128*BITS_PER_UNIT), /* V16DI */ # 1321| MODE_MASK (128*BITS_PER_UNIT), /* V8TI */ # 1322|-> MODE_MASK (256*BITS_PER_UNIT), /* V64SI */ # 1323| MODE_MASK (4*BITS_PER_UNIT), /* V2HF */ # 1324| MODE_MASK (4*BITS_PER_UNIT), /* V2BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1325: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1323| MODE_MASK (4*BITS_PER_UNIT), /* V2HF */ # 1324| MODE_MASK (4*BITS_PER_UNIT), /* V2BF */ # 1325|-> MODE_MASK (8*BITS_PER_UNIT), /* V4BF */ # 1326| MODE_MASK (8*BITS_PER_UNIT), /* V4HF */ # 1327| MODE_MASK (8*BITS_PER_UNIT), /* V2SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1326: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1324| MODE_MASK (4*BITS_PER_UNIT), /* V2BF */ # 1325| MODE_MASK (8*BITS_PER_UNIT), /* V4BF */ # 1326|-> MODE_MASK (8*BITS_PER_UNIT), /* V4HF */ # 1327| MODE_MASK (8*BITS_PER_UNIT), /* V2SF */ # 1328| MODE_MASK (12*BITS_PER_UNIT), /* V6HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1327: error[shiftTooManyBits]: Shifting 64-bit value by 64 bits is undefined behaviour # 1325| MODE_MASK (8*BITS_PER_UNIT), /* V4BF */ # 1326| MODE_MASK (8*BITS_PER_UNIT), /* V4HF */ # 1327|-> MODE_MASK (8*BITS_PER_UNIT), /* V2SF */ # 1328| MODE_MASK (12*BITS_PER_UNIT), /* V6HF */ # 1329| MODE_MASK (16*BITS_PER_UNIT), /* V8BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1328: error[shiftTooManyBits]: Shifting 64-bit value by 96 bits is undefined behaviour # 1326| MODE_MASK (8*BITS_PER_UNIT), /* V4HF */ # 1327| MODE_MASK (8*BITS_PER_UNIT), /* V2SF */ # 1328|-> MODE_MASK (12*BITS_PER_UNIT), /* V6HF */ # 1329| MODE_MASK (16*BITS_PER_UNIT), /* V8BF */ # 1330| MODE_MASK (16*BITS_PER_UNIT), /* V8HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1329: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1327| MODE_MASK (8*BITS_PER_UNIT), /* V2SF */ # 1328| MODE_MASK (12*BITS_PER_UNIT), /* V6HF */ # 1329|-> MODE_MASK (16*BITS_PER_UNIT), /* V8BF */ # 1330| MODE_MASK (16*BITS_PER_UNIT), /* V8HF */ # 1331| MODE_MASK (16*BITS_PER_UNIT), /* V4SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1330: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1328| MODE_MASK (12*BITS_PER_UNIT), /* V6HF */ # 1329| MODE_MASK (16*BITS_PER_UNIT), /* V8BF */ # 1330|-> MODE_MASK (16*BITS_PER_UNIT), /* V8HF */ # 1331| MODE_MASK (16*BITS_PER_UNIT), /* V4SF */ # 1332| MODE_MASK (16*BITS_PER_UNIT), /* V2DF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1331: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1329| MODE_MASK (16*BITS_PER_UNIT), /* V8BF */ # 1330| MODE_MASK (16*BITS_PER_UNIT), /* V8HF */ # 1331|-> MODE_MASK (16*BITS_PER_UNIT), /* V4SF */ # 1332| MODE_MASK (16*BITS_PER_UNIT), /* V2DF */ # 1333| MODE_MASK (32*BITS_PER_UNIT), /* V16BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1332: error[shiftTooManyBits]: Shifting 64-bit value by 128 bits is undefined behaviour # 1330| MODE_MASK (16*BITS_PER_UNIT), /* V8HF */ # 1331| MODE_MASK (16*BITS_PER_UNIT), /* V4SF */ # 1332|-> MODE_MASK (16*BITS_PER_UNIT), /* V2DF */ # 1333| MODE_MASK (32*BITS_PER_UNIT), /* V16BF */ # 1334| MODE_MASK (32*BITS_PER_UNIT), /* V16HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1333: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1331| MODE_MASK (16*BITS_PER_UNIT), /* V4SF */ # 1332| MODE_MASK (16*BITS_PER_UNIT), /* V2DF */ # 1333|-> MODE_MASK (32*BITS_PER_UNIT), /* V16BF */ # 1334| MODE_MASK (32*BITS_PER_UNIT), /* V16HF */ # 1335| MODE_MASK (32*BITS_PER_UNIT), /* V8SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1334: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1332| MODE_MASK (16*BITS_PER_UNIT), /* V2DF */ # 1333| MODE_MASK (32*BITS_PER_UNIT), /* V16BF */ # 1334|-> MODE_MASK (32*BITS_PER_UNIT), /* V16HF */ # 1335| MODE_MASK (32*BITS_PER_UNIT), /* V8SF */ # 1336| MODE_MASK (32*BITS_PER_UNIT), /* V4DF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1335: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1333| MODE_MASK (32*BITS_PER_UNIT), /* V16BF */ # 1334| MODE_MASK (32*BITS_PER_UNIT), /* V16HF */ # 1335|-> MODE_MASK (32*BITS_PER_UNIT), /* V8SF */ # 1336| MODE_MASK (32*BITS_PER_UNIT), /* V4DF */ # 1337| MODE_MASK (32*BITS_PER_UNIT), /* V2TF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1336: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1334| MODE_MASK (32*BITS_PER_UNIT), /* V16HF */ # 1335| MODE_MASK (32*BITS_PER_UNIT), /* V8SF */ # 1336|-> MODE_MASK (32*BITS_PER_UNIT), /* V4DF */ # 1337| MODE_MASK (32*BITS_PER_UNIT), /* V2TF */ # 1338| MODE_MASK (64*BITS_PER_UNIT), /* V32BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1337: error[shiftTooManyBits]: Shifting 64-bit value by 256 bits is undefined behaviour # 1335| MODE_MASK (32*BITS_PER_UNIT), /* V8SF */ # 1336| MODE_MASK (32*BITS_PER_UNIT), /* V4DF */ # 1337|-> MODE_MASK (32*BITS_PER_UNIT), /* V2TF */ # 1338| MODE_MASK (64*BITS_PER_UNIT), /* V32BF */ # 1339| MODE_MASK (64*BITS_PER_UNIT), /* V32HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1338: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1336| MODE_MASK (32*BITS_PER_UNIT), /* V4DF */ # 1337| MODE_MASK (32*BITS_PER_UNIT), /* V2TF */ # 1338|-> MODE_MASK (64*BITS_PER_UNIT), /* V32BF */ # 1339| MODE_MASK (64*BITS_PER_UNIT), /* V32HF */ # 1340| MODE_MASK (64*BITS_PER_UNIT), /* V16SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1339: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1337| MODE_MASK (32*BITS_PER_UNIT), /* V2TF */ # 1338| MODE_MASK (64*BITS_PER_UNIT), /* V32BF */ # 1339|-> MODE_MASK (64*BITS_PER_UNIT), /* V32HF */ # 1340| MODE_MASK (64*BITS_PER_UNIT), /* V16SF */ # 1341| MODE_MASK (64*BITS_PER_UNIT), /* V8DF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1340: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1338| MODE_MASK (64*BITS_PER_UNIT), /* V32BF */ # 1339| MODE_MASK (64*BITS_PER_UNIT), /* V32HF */ # 1340|-> MODE_MASK (64*BITS_PER_UNIT), /* V16SF */ # 1341| MODE_MASK (64*BITS_PER_UNIT), /* V8DF */ # 1342| MODE_MASK (64*BITS_PER_UNIT), /* V4TF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1341: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1339| MODE_MASK (64*BITS_PER_UNIT), /* V32HF */ # 1340| MODE_MASK (64*BITS_PER_UNIT), /* V16SF */ # 1341|-> MODE_MASK (64*BITS_PER_UNIT), /* V8DF */ # 1342| MODE_MASK (64*BITS_PER_UNIT), /* V4TF */ # 1343| MODE_MASK (128*BITS_PER_UNIT), /* V64BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1342: error[shiftTooManyBits]: Shifting 64-bit value by 512 bits is undefined behaviour # 1340| MODE_MASK (64*BITS_PER_UNIT), /* V16SF */ # 1341| MODE_MASK (64*BITS_PER_UNIT), /* V8DF */ # 1342|-> MODE_MASK (64*BITS_PER_UNIT), /* V4TF */ # 1343| MODE_MASK (128*BITS_PER_UNIT), /* V64BF */ # 1344| MODE_MASK (128*BITS_PER_UNIT), /* V64HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1343: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1341| MODE_MASK (64*BITS_PER_UNIT), /* V8DF */ # 1342| MODE_MASK (64*BITS_PER_UNIT), /* V4TF */ # 1343|-> MODE_MASK (128*BITS_PER_UNIT), /* V64BF */ # 1344| MODE_MASK (128*BITS_PER_UNIT), /* V64HF */ # 1345| MODE_MASK (128*BITS_PER_UNIT), /* V32SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1344: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1342| MODE_MASK (64*BITS_PER_UNIT), /* V4TF */ # 1343| MODE_MASK (128*BITS_PER_UNIT), /* V64BF */ # 1344|-> MODE_MASK (128*BITS_PER_UNIT), /* V64HF */ # 1345| MODE_MASK (128*BITS_PER_UNIT), /* V32SF */ # 1346| MODE_MASK (128*BITS_PER_UNIT), /* V16DF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1345: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1343| MODE_MASK (128*BITS_PER_UNIT), /* V64BF */ # 1344| MODE_MASK (128*BITS_PER_UNIT), /* V64HF */ # 1345|-> MODE_MASK (128*BITS_PER_UNIT), /* V32SF */ # 1346| MODE_MASK (128*BITS_PER_UNIT), /* V16DF */ # 1347| MODE_MASK (128*BITS_PER_UNIT), /* V8TF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1346: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1344| MODE_MASK (128*BITS_PER_UNIT), /* V64HF */ # 1345| MODE_MASK (128*BITS_PER_UNIT), /* V32SF */ # 1346|-> MODE_MASK (128*BITS_PER_UNIT), /* V16DF */ # 1347| MODE_MASK (128*BITS_PER_UNIT), /* V8TF */ # 1348| MODE_MASK (256*BITS_PER_UNIT), /* V128BF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1347: error[shiftTooManyBits]: Shifting 64-bit value by 1024 bits is undefined behaviour # 1345| MODE_MASK (128*BITS_PER_UNIT), /* V32SF */ # 1346| MODE_MASK (128*BITS_PER_UNIT), /* V16DF */ # 1347|-> MODE_MASK (128*BITS_PER_UNIT), /* V8TF */ # 1348| MODE_MASK (256*BITS_PER_UNIT), /* V128BF */ # 1349| MODE_MASK (256*BITS_PER_UNIT), /* V128HF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1348: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1346| MODE_MASK (128*BITS_PER_UNIT), /* V16DF */ # 1347| MODE_MASK (128*BITS_PER_UNIT), /* V8TF */ # 1348|-> MODE_MASK (256*BITS_PER_UNIT), /* V128BF */ # 1349| MODE_MASK (256*BITS_PER_UNIT), /* V128HF */ # 1350| MODE_MASK (256*BITS_PER_UNIT), /* V64SF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1349: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1347| MODE_MASK (128*BITS_PER_UNIT), /* V8TF */ # 1348| MODE_MASK (256*BITS_PER_UNIT), /* V128BF */ # 1349|-> MODE_MASK (256*BITS_PER_UNIT), /* V128HF */ # 1350| MODE_MASK (256*BITS_PER_UNIT), /* V64SF */ # 1351| MODE_MASK (256*BITS_PER_UNIT), /* V32DF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1350: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1348| MODE_MASK (256*BITS_PER_UNIT), /* V128BF */ # 1349| MODE_MASK (256*BITS_PER_UNIT), /* V128HF */ # 1350|-> MODE_MASK (256*BITS_PER_UNIT), /* V64SF */ # 1351| MODE_MASK (256*BITS_PER_UNIT), /* V32DF */ # 1352| MODE_MASK (256*BITS_PER_UNIT), /* V16TF */ Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1351: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1349| MODE_MASK (256*BITS_PER_UNIT), /* V128HF */ # 1350| MODE_MASK (256*BITS_PER_UNIT), /* V64SF */ # 1351|-> MODE_MASK (256*BITS_PER_UNIT), /* V32DF */ # 1352| MODE_MASK (256*BITS_PER_UNIT), /* V16TF */ # 1353| #undef MODE_MASK Error: CPPCHECK_WARNING (CWE-758): gcc-14.0.1-20240411/obj-x86_64-redhat-linux/gcc/insn-modes.cc:1352: error[shiftTooManyBits]: Shifting 64-bit value by 2048 bits is undefined behaviour # 1350| MODE_MASK (256*BITS_PER_UNIT), /* V64SF */ # 1351| MODE_MASK (256*BITS_PER_UNIT), /* V32DF */ # 1352|-> MODE_MASK (256*BITS_PER_UNIT), /* V16TF */ # 1353| #undef MODE_MASK # 1354| };