public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/17179] New: g++ miscompiles arrays initialized with compound literals @ 2004-08-25 2:21 anders at kaseorg dot com 2004-08-25 4:09 ` [Bug c++/17179] " pinskia at gcc dot gnu dot org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: anders at kaseorg dot com @ 2004-08-25 2:21 UTC (permalink / raw) To: gcc-bugs The following program: #include <stdio.h> static int y[] = (int []) {1, 2, 3}; int main () { printf ("%d %d %d\n", y[0], y[1], y[2]); } gives "1 2 3" when compiled with gcc, but it gives "0 0 0" when compiled with g++. I'm using gcc-3.3.3-7 on Fedora Core 2. My friend using gcc-3.4.1-r2 on Gentoo reports that the same program causes g++ to segfault. -- Summary: g++ miscompiles arrays initialized with compound literals Product: gcc Version: 3.3.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anders at kaseorg dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17179 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17179] g++ miscompiles arrays initialized with compound literals 2004-08-25 2:21 [Bug c++/17179] New: g++ miscompiles arrays initialized with compound literals anders at kaseorg dot com @ 2004-08-25 4:09 ` pinskia at gcc dot gnu dot org 2004-08-25 4:54 ` pinskia at gcc dot gnu dot org 2004-08-25 12:37 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-25 4:09 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-25 04:09 ------- started to reject between 2004-05-01 and 2004-04-10 Started to ICE: Search converges between 2003-06-03-trunk (#253) and 2003-06-04-trunk (#254). Note this neither valid C++ or even valid C99. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17179 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17179] g++ miscompiles arrays initialized with compound literals 2004-08-25 2:21 [Bug c++/17179] New: g++ miscompiles arrays initialized with compound literals anders at kaseorg dot com 2004-08-25 4:09 ` [Bug c++/17179] " pinskia at gcc dot gnu dot org @ 2004-08-25 4:54 ` pinskia at gcc dot gnu dot org 2004-08-25 12:37 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu dot org @ 2004-08-25 4:54 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-25 04:54 ------- *** This bug has been marked as a duplicate of 16042 *** -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17179 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/17179] g++ miscompiles arrays initialized with compound literals 2004-08-25 2:21 [Bug c++/17179] New: g++ miscompiles arrays initialized with compound literals anders at kaseorg dot com 2004-08-25 4:09 ` [Bug c++/17179] " pinskia at gcc dot gnu dot org 2004-08-25 4:54 ` pinskia at gcc dot gnu dot org @ 2004-08-25 12:37 ` bangerth at dealii dot org 2 siblings, 0 replies; 4+ messages in thread From: bangerth at dealii dot org @ 2004-08-25 12:37 UTC (permalink / raw) To: gcc-bugs ------- Additional Comments From bangerth at dealii dot org 2004-08-25 12:37 ------- BTW, mainline reports an error on the cast, so that the question of the allegedly wrong code doesn't pose itself anymore. W. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17179 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-08-25 12:37 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2004-08-25 2:21 [Bug c++/17179] New: g++ miscompiles arrays initialized with compound literals anders at kaseorg dot com 2004-08-25 4:09 ` [Bug c++/17179] " pinskia at gcc dot gnu dot org 2004-08-25 4:54 ` pinskia at gcc dot gnu dot org 2004-08-25 12:37 ` bangerth at dealii dot org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).