https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86451
Bug ID: 86451 Summary: Incorrect "is used uninitialized" Product: gcc Version: 8.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: j...@swi-prolog.org Target Milestone: --- Created attachment 44369 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44369&action=edit C source file (short, no includes) On quite a few versions I get this (I think) incorrect message: t.c: In function ‘t’: t.c:9:12: warning: ‘t’ is used uninitialized in this function [-Wuninitialized] key ^= *p; Compiled using gcc -v -save-temps -c -Wall -O2 t.c Below is the complete console output up to the warning. Note that this is a simplified version of the real code. The 0.0 is normally a function call. Thanks --- Jan Using built-in specs. COLLECT_GCC=gcc OFFLOAD_TARGET_NAMES=nvptx-none OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-redhat-linux Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 8.1.1 20180502 (Red Hat 8.1.1-1) (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-Wall' '-O2' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/8/cc1 -E -quiet -v t.c -mtune=generic -march=x86-64 -Wall -O2 -fpch-preprocess -o t.i ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/include-fixed" ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/8/../../../../x86_64-redhat-linux/include" #include "..." search starts here: #include <...> search starts here: /ufs/wielemak/include /usr/lib/gcc/x86_64-redhat-linux/8/include /usr/local/include /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-c' '-Wall' '-O2' '-mtune=generic' '-march=x86-64' /usr/libexec/gcc/x86_64-redhat-linux/8/cc1 -fpreprocessed t.i -quiet -dumpbase t.c -mtune=generic -march=x86-64 -auxbase t -O2 -Wall -version -o t.s GNU C17 (GCC) version 8.1.1 20180502 (Red Hat 8.1.1-1) (x86_64-redhat-linux) compiled by GNU C version 8.1.1 20180502 (Red Hat 8.1.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C17 (GCC) version 8.1.1 20180502 (Red Hat 8.1.1-1) (x86_64-redhat-linux) compiled by GNU C version 8.1.1 20180502 (Red Hat 8.1.1-1), GMP version 6.1.2, MPFR version 3.1.6-p2, MPC version 1.0.2, isl version isl-0.16.1-GMP GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: f4961d4fd1326e1750d95d53d7feee3c t.c: In function ‘t’: t.c:9:12: warning: ‘t’ is used uninitialized in this function [-Wuninitialized] key ^= *p; ^~