public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53989] New: Internal compiler error in strip_typedefs, at cp/tree.c:1187
@ 2012-07-17  5:06 gcc at limax dot org
  2012-07-17  6:05 ` [Bug c++/53989] [4.6/4.7 regression] " gcc at limax dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gcc at limax dot org @ 2012-07-17  5:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53989

             Bug #: 53989
           Summary: Internal compiler error in strip_typedefs, at
                    cp/tree.c:1187
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gcc@limax.org


Running 'g++ -std=c++0x -c test.cpp' with the following source saved as
test.cpp:

---------------
struct Foo {
  int value;
  static Foo const foos[2];
};

void bar() {
  for (Foo f : Foo::foos) { (void) f; }
}
--------------

produces this result:

---------------
test.cpp: In function ‘void bar()’:
test.cpp:8:21: internal compiler error: in strip_typedefs, at cp/tree.c:1187
---------------


If I get rid of the 'value' member of Foo, or if I provide a definition of
Foo::foos before it is used by Bar, or if I change Foo::foos to be type 'Foo'
instead of type 'Foo const', or if I move Foo::foos outside of class Foo, I
don't see the error.

GCC was built using the following configuration:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/tools/sw/gcc/471/rhel5-x86_64/libexec/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/tools/sw/gcc/471/rhel5-x86_64
--with-gmp=/home/tools/sw/gcc/471/rhel5-x86_64
--with-ppl=/home/tools/sw/gcc/471/rhel5-x86_64
--with-cloog=/home/tools/sw/gcc/471/rhel5-x86_64 --enable-cloog-backend=isl
--with-system-zlib --enable-__cxa_atexit --enable-shared --enable-threads=posix
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.7.1 (GCC)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-07-17 21:35 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17  5:06 [Bug c++/53989] New: Internal compiler error in strip_typedefs, at cp/tree.c:1187 gcc at limax dot org
2012-07-17  6:05 ` [Bug c++/53989] [4.6/4.7 regression] " gcc at limax dot org
2012-07-17  7:42 ` [Bug c++/53989] [4.7/4.8 " jakub at gcc dot gnu.org
2012-07-17 19:55 ` jason at gcc dot gnu.org
2012-07-17 20:06 ` [Bug c++/53989] [4.7 " jason at gcc dot gnu.org
2012-07-17 20:38 ` jakub at gcc dot gnu.org
2012-07-17 21:34 ` jason at gcc dot gnu.org
2012-07-17 21:34 ` jason at gcc dot gnu.org
2012-07-17 21:35 ` jason at gcc dot gnu.org
2012-07-17 21:35 ` jason at gcc dot gnu.org
2012-07-17 21:35 ` jason at gcc dot gnu.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).