This looks like a ice-on-invalid-code regression in g++ 4.4/4.5:

==========
template < unsigned >
struct A ;
template < typename >
struct B ;
template < typename T , A < B < T >
{ }
==========

---------- 4.4.0 ----------
$ x86_64-linux-gnu-gcc-4.4.x -v -std=c++0x -c
ice-uses_template_parms-cp_pt.c-6333.ii
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4_4-branch/configure
--prefix=/opt/software/gcc-x86_64/gcc-4.4.x --program-suffix=-4.4.x
--enable-languages=c,c++
Thread model: posix
gcc version 4.4.0 20090410 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-c' '-mtune=generic'

/opt/software/gcc-x86_64/gcc-4.4.x/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1plus
-fpreprocessed ice-uses_template_parms-cp_pt.c-6333.ii -quiet -dumpbase
ice-uses_template_parms-cp_pt.c-6333.ii -mtune=generic -auxbase
ice-uses_template_parms-cp_pt.c-6333 -std=c++0x -version -o /tmp/cc39e69f.s
GNU C++ (GCC) version 4.4.0 20090410 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20090410 (prerelease), GMP version
4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 657fe6b0026e91b1c11fd1c9e3d93a45
ice-uses_template_parms-cp_pt.c-6333.ii:7: internal compiler error: in
uses_template_parms, at cp/pt.c:6332
--------------------

---------- 4.5.0 ----------
$ x86_64-linux-gnu-gcc-trunk -v -std=c++0x -c
ice-uses_template_parms-cp_pt.c-6333.ii
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--prefix=/opt/software/gcc-x86_64/gcc-trunk --program-suffix=-trunk
--enable-languages=c,c++
Thread model: posix
gcc version 4.5.0 20090412 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-c' '-mtune=generic'

/opt/software/gcc-x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus
-fpreprocessed ice-uses_template_parms-cp_pt.c-6333.ii -quiet -dumpbase
ice-uses_template_parms-cp_pt.c-6333.ii -mtune=generic -auxbase
ice-uses_template_parms-cp_pt.c-6333 -std=c++0x -version -o /tmp/ccNif1hj.s
GNU C++ (GCC) version 4.5.0 20090412 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.5.0 20090410 (experimental), GMP version
4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b13346d60276f3352c4b7dd22e3889d7
ice-uses_template_parms-cp_pt.c-6333.ii:7: internal compiler error: in
uses_template_parms, at cp/pt.c:6333
--------------------

---------- 4.3.x ----------
$ x86_64-linux-gnu-gcc-4.3.x -v -std=c++0x -c
ice-uses_template_parms-cp_pt.c-6333.ii
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4_3-branch/configure
--prefix=/opt/software/gcc-x86_64/gcc-4.3.x --program-suffix=-4.3.x
--enable-languages=c,c++
Thread model: posix
gcc version 4.3.4 20090410 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-c' '-mtune=generic'

/opt/software/gcc-x86_64/gcc-4.3.x/libexec/gcc/x86_64-unknown-linux-gnu/4.3.4/cc1plus
-fpreprocessed ice-uses_template_parms-cp_pt.c-6333.ii -quiet -dumpbase
ice-uses_template_parms-cp_pt.c-6333.ii -mtune=generic -auxbase
ice-uses_template_parms-cp_pt.c-6333 -std=c++0x -version -o /tmp/ccPe9b92.s
GNU C++ (GCC) version 4.3.4 20090410 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.3.4 20090410 (prerelease), GMP version
4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: d7de70b1d6112d4a739b8abc5fbe181e
ice-uses_template_parms-cp_pt.c-6333.ii:5: error: template argument 1 is
invalid
ice-uses_template_parms-cp_pt.c-6333.ii:6: error: expected '>' before '{' token
ice-uses_template_parms-cp_pt.c-6333.ii:6: error: expected unqualified-id
before '{' token
--------------------


-- 
           Summary: ICE in uses_template_parms, at cp/pt.c:6332
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at abeckmann dot de


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

Reply via email to