[Bug c++/69697] incorrect initialization of static flexible array members
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 27 20:42:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69697
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-03-27
Ever confirmed|0 |1
Known to fail| |5.3.1, 6.3.0, 7.0
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirming. To make things worse, the program output changes between -O0 and
-O1:
$ (for o in 0 1 2 3; do gcc -O$o -Wall -Wextra y.C && ./a.out; done)
i = 0, j = 3, a = { 2, { 3, 4, } }
i = 3, j = 0, a = { 2, { 3, 4, } }
i = 3, j = 0, a = { 2, { 3, 4, } }
i = 3, j = 0, a = { 2, { 3, 4, } }
More information about the Gcc-bugs
mailing list