This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/69697] incorrect initialization of static flexible array members
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 27 Mar 2017 20:42:03 +0000
- Subject: [Bug c++/69697] incorrect initialization of static flexible array members
- Auto-submitted: auto-generated
- References: <bug-69697-4@http.gcc.gnu.org/bugzilla/>
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, } }