https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #7 from Dave A ---
-fsanitize=address balked on the executable even without the -O2, even though
it printed out the correct values. The stack must have been initialzed and the
values persisted after the variable went out of scope.
I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #6 from Andrew Pinski ---
-fsanitize=address would have told you you used the address after it went out
of scope.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #5 from Andrew Pinski ---
6.5.2.5 Compound literals
5 The value of the compound literal is that of an unnamed object initialized by
the initializer list. If the compound literal occurs outside the body of a
function, the object has
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #3 from Andrew Pinski ---
I mean compound literal not Designated initializers.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #2 from Andrew Pinski ---
The temporary that stores the Designated initializer goes out of scope at the
end of the statement that is inside the if statement.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106843
--- Comment #1 from Dave A ---
gcc -dumpmachine
x86_64-slackware-linux
gcc -v
Reading specs from /usr/lib64/gcc/x86_64-slackware-linux/11.2.0/specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/11.2.0/lto-wrapper
T