public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11852] New: ICE: g++ with bad struct initializer.
@ 2003-08-08 9:42 krh at bitplanet dot net
2003-08-08 12:08 ` [Bug c++/11852] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: krh at bitplanet dot net @ 2003-08-08 9:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
Summary: ICE: g++ with bad struct initializer.
Product: gcc
Version: 3.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: krh at bitplanet dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: Redhat build, don't know.
GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux
g++ crashes with an ICE on the following program:
struct bug {
const char *name;
unsigned long type;
};
struct bug s = { 0, (unsigned long) &s | 1 };
When compiled as C code, gcc says "initializer element is not computable at load
time".
Output of gcc -v:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
@ 2003-08-08 12:08 ` pinskia at gcc dot gnu dot org
2003-08-08 12:10 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-08 12:08 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2003-08-08 12:08:09
date| |
Summary|ICE: g++ with bad struct |[3.3/3.4 Regression] ICE:
|initializer. |g++ with bad struct
| |initializer.
Target Milestone|3.4 |3.3.2
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-08 12:08 -------
It did not crash on 2.95.3 (and was accepted). I can confirm this in 3.3.1 (20030707) and the
mainline (20030807).
Even 2.97 20001231 crash (according to Phil's regression hunter) and 2.96 (20000731 RedHat)
crashes.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
2003-08-08 12:08 ` [Bug c++/11852] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2003-08-08 12:10 ` pinskia at gcc dot gnu dot org
2003-08-08 14:37 ` falk at debian dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-08 12:10 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
GCC build triplet|Redhat build, don't know. |
Priority|P2 |P1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
2003-08-08 12:08 ` [Bug c++/11852] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2003-08-08 12:10 ` pinskia at gcc dot gnu dot org
@ 2003-08-08 14:37 ` falk at debian dot org
2003-08-08 15:51 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: falk at debian dot org @ 2003-08-08 14:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code |ice-on-invalid-code
------- Additional Comments From falk at debian dot org 2003-08-08 14:37 -------
This is really ice-on-invalid-code, since a constant expression may contain
addresses only with constant offsets. I can't reproduce the ICE with mainline
20030802 on alphaev68-unknown-linux-gnu.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
` (2 preceding siblings ...)
2003-08-08 14:37 ` falk at debian dot org
@ 2003-08-08 15:51 ` pinskia at gcc dot gnu dot org
2003-09-07 23:48 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-08 15:51 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-on-valid-code
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-08-08 15:51 -------
Actually it is valid as in C++ you can have initializers which are not constant. I also can confirm
this on powerpc-apple-darwin6.6 on the mainline (20030806).
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
` (3 preceding siblings ...)
2003-08-08 15:51 ` pinskia at gcc dot gnu dot org
@ 2003-09-07 23:48 ` cvs-commit at gcc dot gnu dot org
2003-09-07 23:51 ` cvs-commit at gcc dot gnu dot org
2003-09-07 23:52 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-07 23:48 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-09-07 23:48 -------
Subject: Bug 11852
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2003-09-07 23:48:34
Modified files:
gcc : varasm.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: struct1.C
Log message:
PR c++/11852
* varasm.c (initializer_constant_valid_p): Correct logic for
CONSTRUCTORs.
PR c++/11852
* g++.dg/init/struct1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&r1=1.381&r2=1.382
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.1000&r2=2.1001
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3035&r2=1.3036
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/struct1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
` (4 preceding siblings ...)
2003-09-07 23:48 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-07 23:51 ` cvs-commit at gcc dot gnu dot org
2003-09-07 23:52 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-07 23:51 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-09-07 23:51 -------
Subject: Bug 11852
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_3-branch
Changes by: mmitchel@gcc.gnu.org 2003-09-07 23:51:05
Modified files:
gcc : varasm.c ChangeLog
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: struct1.C
Log message:
PR c++/11852
* varasm.c (initializer_constant_valid_p): Correct logic for
CONSTRUCTORs.
PR c++/11852
* g++.dg/init/struct1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/varasm.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.324.2.7&r2=1.324.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.728&r2=1.16114.2.729
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.2261.2.271&r2=1.2261.2.272
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/struct1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=NONE&r2=1.1.2.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/11852] [3.3/3.4 Regression] ICE: g++ with bad struct initializer.
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
` (5 preceding siblings ...)
2003-09-07 23:51 ` cvs-commit at gcc dot gnu dot org
@ 2003-09-07 23:52 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-09-07 23:52 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11852
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From mmitchel at gcc dot gnu dot org 2003-09-07 23:52 -------
Fixed in GCC 3.3.2, GCC 3.4.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-09-07 23:52 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 9:42 [Bug c++/11852] New: ICE: g++ with bad struct initializer krh at bitplanet dot net
2003-08-08 12:08 ` [Bug c++/11852] [3.3/3.4 Regression] " pinskia at gcc dot gnu dot org
2003-08-08 12:10 ` pinskia at gcc dot gnu dot org
2003-08-08 14:37 ` falk at debian dot org
2003-08-08 15:51 ` pinskia at gcc dot gnu dot org
2003-09-07 23:48 ` cvs-commit at gcc dot gnu dot org
2003-09-07 23:51 ` cvs-commit at gcc dot gnu dot org
2003-09-07 23:52 ` mmitchel at gcc dot gnu 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).