https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117911
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #9 from Sam James <sjames at gcc dot gnu.org> ---
I'm afraid I think it's invalid. If I mangle the testcase slightly to build
with Clang, I see with Valgrind too:
==14457==
==14457== Invalid read of size 4
==14457== at 0x112A17: func_2 (b.c:3193)
==14457== by 0x110524: func_1 (b.c:2654)
==14457== by 0x10FBE1: main (b.c:4439)
==14457== Address 0x1ffeffd51c is on thread 1's stack
==14457== 2436 bytes below stack pointer
Ditto gcc -O0.