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

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).