This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/69697] incorrect initialization of static flexible array members


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, } }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]