public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/20646] New: ICE on illegal code: "extern static" struct member
@ 2005-03-26 7:27 dan dot rosen at gmail dot com
2005-03-26 7:32 ` [Bug c++/20646] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dan dot rosen at gmail dot com @ 2005-03-26 7:27 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2376 bytes --]
I don't know what I was thinking when I wrote this, but the following illegal
code (.ii, tiny testcase) causes an ICE in g++-4.0 which was not present in 3.4:
# 1 "extern-static.cpp"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "extern-static.cpp"
struct foo {
extern static int i;
};
int main () {
return 0;
}
The output I get is:
dr@peaceful:~/src$ g++-4.0 -save-temps -o extern-static extern-static.cpp
extern-static.cpp:2: error: multiple storage classes in declaration of i
extern-static.cpp:2: internal compiler error: tree check: expected var_decl or
function_decl or parm_decl, have field_decl in grokdeclarator, at cp/decl.c:8161
The several versions of gcc I have, I got as debian packages. The output of gcc
-v for my 4.0 and 3.4 builds, respectively, are:
dr@peaceful:~/src$ gcc-4.0 -v
Using built-in specs.
Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada
--prefix=/usr --libexecdir=/usr/lib --enable-shared --with-system-zlib
--enable-nls --enable-threads=posix --without-included-gettext
--program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --enable-mpfr i486-linux
Thread model: posix
gcc version 4.0.0 20050125 (experimental) (Debian 4.0-0pre5)
dr@peaceful:~/src$ gcc-3.4 -v
Reading specs from /usr/lib/gcc/i486-linux/3.4.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --disable-werror i486-linux
Thread model: posix
gcc version 3.4.4 20050305 (prerelease) (Debian 3.4.3-11)
--
Summary: ICE on illegal code: "extern static" struct member
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dan dot rosen at gmail dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
@ 2005-03-26 7:32 ` pinskia at gcc dot gnu dot org
2005-04-11 20:50 ` reichelt at gcc dot gnu dot org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-26 7:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-26 07:32 -------
Confirmed, an error recovery problem, not a release blocking regression for 4.0.0, setting target
milestone to 4.0.1 as per Mark, the Release manager.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |minor
Status|UNCONFIRMED |NEW
Component|regression |c++
Ever Confirmed| |1
Keywords| |error-recovery, ice-on-
| |invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-03-26 07:32:13
date| |
Summary|ICE on illegal code: "extern|[4.0/4.1 Regression] ICE on
|static" struct member |illegal code: "extern
| |static" struct member
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
2005-03-26 7:32 ` [Bug c++/20646] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-04-11 20:50 ` reichelt at gcc dot gnu dot org
2005-04-12 1:22 ` mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-04-11 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-04-11 20:50 -------
Mark, this appeared with your patch
http://gcc.gnu.org/ml/gcc-cvs/2004-06/msg00988.html
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org, reichelt at gcc dot gnu
| |dot org
Keywords| |monitored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
2005-03-26 7:32 ` [Bug c++/20646] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-11 20:50 ` reichelt at gcc dot gnu dot org
@ 2005-04-12 1:22 ` mmitchel at gcc dot gnu dot org
2005-07-08 1:39 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-04-12 1:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (2 preceding siblings ...)
2005-04-12 1:22 ` mmitchel at gcc dot gnu dot org
@ 2005-07-08 1:39 ` mmitchel at gcc dot gnu dot org
2005-08-09 22:02 ` reichelt at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-07-08 1:39 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (3 preceding siblings ...)
2005-07-08 1:39 ` mmitchel at gcc dot gnu dot org
@ 2005-08-09 22:02 ` reichelt at gcc dot gnu dot org
2005-08-09 23:54 ` mark at codesourcery dot com
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-09 22:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-09 22:01 -------
Mark, are you still working on this one?
Btw, the following patch fixes the ICE for me.
Passed bootstrap and regtests.
===================================================================
--- gcc/gcc/cp/decl.c 1 Aug 2005 04:02:24 -0000 1.1416
+++ gcc/gcc/cp/decl.c 9 Aug 2005 13:10:55 -0000
@@ -7064,7 +7064,10 @@ grokdeclarator (const cp_declarator *dec
/* Warn about storage classes that are invalid for certain
kinds of declarations (parameters, typenames, etc.). */
if (declspecs->multiple_storage_classes_p)
- error ("multiple storage classes in declaration of %qs", name);
+ {
+ error ("multiple storage classes in declaration of %qs", name);
+ storage_class = sc_none;
+ }
else if (thread_p
&& ((storage_class
&& storage_class != sc_extern
===================================================================
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (4 preceding siblings ...)
2005-08-09 22:02 ` reichelt at gcc dot gnu dot org
@ 2005-08-09 23:54 ` mark at codesourcery dot com
2005-08-10 0:17 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: mark at codesourcery dot com @ 2005-08-09 23:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mark at codesourcery dot com 2005-08-09 23:53 -------
Subject: Re: [4.0/4.1 Regression] ICE on illegal code: "extern
static" struct member
reichelt at gcc dot gnu dot org wrote:
> ------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-09 22:01 -------
> Mark, are you still working on this one?
>
> Btw, the following patch fixes the ICE for me.
> Passed bootstrap and regtests.
I had meant to fix this -- but I'm happy that you did.
Your patch is OK. Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (5 preceding siblings ...)
2005-08-09 23:54 ` mark at codesourcery dot com
@ 2005-08-10 0:17 ` reichelt at gcc dot gnu dot org
2005-08-10 0:21 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-10 0:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-10 00:15 -------
Taking over.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (6 preceding siblings ...)
2005-08-10 0:17 ` reichelt at gcc dot gnu dot org
@ 2005-08-10 0:21 ` cvs-commit at gcc dot gnu dot org
2005-08-10 0:26 ` cvs-commit at gcc dot gnu dot org
2005-08-10 0:27 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-10 0:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-10 00:21 -------
Subject: Bug 20646
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: reichelt@gcc.gnu.org 2005-08-10 00:20:33
Modified files:
gcc/cp : ChangeLog decl.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/other: mult-stor1.C
Log message:
PR c++/20646
* decl.c (grokdeclarator): Reset storage_class after error.
* g++.dg/other/mult-stor1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4845&r2=1.4846
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1416&r2=1.1417
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5901&r2=1.5902
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/mult-stor1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (7 preceding siblings ...)
2005-08-10 0:21 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-10 0:26 ` cvs-commit at gcc dot gnu dot org
2005-08-10 0:27 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-08-10 0:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-08-10 00:26 -------
Subject: Bug 20646
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: reichelt@gcc.gnu.org 2005-08-10 00:25:59
Modified files:
gcc/cp : ChangeLog decl.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/other: mult-stor1.C
Log message:
PR c++/20646
* decl.c (grokdeclarator): Reset storage_class after error.
* g++.dg/other/mult-stor1.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.73&r2=1.4648.2.74
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1371.2.16&r2=1.1371.2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.326&r2=1.5084.2.327
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/mult-stor1.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/20646] [4.0/4.1 Regression] ICE on illegal code: "extern static" struct member
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
` (8 preceding siblings ...)
2005-08-10 0:26 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-10 0:27 ` reichelt at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-08-10 0:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-10 00:27 -------
Fixed on mainline and 4.0 branch (for 4.0.2).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20646
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-08-10 0:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-26 7:27 [Bug regression/20646] New: ICE on illegal code: "extern static" struct member dan dot rosen at gmail dot com
2005-03-26 7:32 ` [Bug c++/20646] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-04-11 20:50 ` reichelt at gcc dot gnu dot org
2005-04-12 1:22 ` mmitchel at gcc dot gnu dot org
2005-07-08 1:39 ` mmitchel at gcc dot gnu dot org
2005-08-09 22:02 ` reichelt at gcc dot gnu dot org
2005-08-09 23:54 ` mark at codesourcery dot com
2005-08-10 0:17 ` reichelt at gcc dot gnu dot org
2005-08-10 0:21 ` cvs-commit at gcc dot gnu dot org
2005-08-10 0:26 ` cvs-commit at gcc dot gnu dot org
2005-08-10 0:27 ` reichelt 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).