https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111256
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- In the 2nd iteration of "for (; h <= 3; h = fn3() + h)" the code uses uninitialized value: $ clang t.c -O0 -fsanitize=memory -g $ ./a.out ==76055==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x56392dea5370 in main /home/xry111/t.c:31:5 #1 0x7f9671e27f59 in __libc_start_call_main /home/xry111/sources/lfs/glibc-2.38/csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #2 0x7f9671e28024 in __libc_start_main@GLIBC_2.2.5 /home/xry111/sources/lfs/glibc-2.38/csu/../csu/libc-start.c:360:3 #3 0x56392de0f2d0 in _start /home/xry111/sources/lfs/glibc-2.38/csu/../sysdeps/x86_64/start.S:115 SUMMARY: MemorySanitizer: use-of-uninitialized-value /home/xry111/t.c:31:5 in main Exiting Thus invalid.