This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/68949] [5/6 Regression] Implicit initialization of array member silently miscompiling.
- From: "woutershep at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Dec 2015 03:30:06 +0000
- Subject: [Bug c++/68949] [5/6 Regression] Implicit initialization of array member silently miscompiling.
- Auto-submitted: auto-generated
- References: <bug-68949-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68949
--- Comment #4 from Wouter van Kesteren <woutershep at gmail dot com> ---
I realise that maybe in my effort to make a tiny testcase without headers so
that the .ii wasnt hundreds of lines the testcase might have become a bit hard
to grasp. I'll attach a second cc with a iostream include and a cout to
hopefully clarify things up a bit:
% x86_64-pc-linux-gnu-g++-5.3 -std=c++11 -Wall -Wextra -o zero-cout
zero-cout.cc && ./zero-cout
Expected c.s[0].i to be '-1', got '0'
% x86_64-pc-linux-gnu-g++-4.9 -std=c++11 -Wall -Wextra -o zero-cout
zero-cout.cc && ./zero-cout
Expected c.s[0].i to be '-1', got '-1'
% clang++ -std=c++11 -Wall -Wextra -o zero-cout zero-cout.cc && ./zero-cout
Expected c.s[0].i to be '-1', got '-1'