This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/39754] New: ICE: tree check: accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:9248


The following code produces an ICE in 4.5.0 while previous versions reported an
incomplete type error:

========== 8< ==========
template < typename > struct A ;
template < typename U , typename > struct B
{
        typedef U V ;
        A < V * > a ;
} ;
template < typename W > struct C
{
        A < W * > a ;
} ;
C < int > c ;
========== >8 ==========

---------- 4.5.0 ----------
$ x86_64-linux-gnu-g++-trunk -v -c ice-accessed-elt-2-of-tree_vec.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 20090410 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic'

/opt/software/gcc-x86_64/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1plus
-fpreprocessed ice-accessed-elt-2-of-tree_vec.ii -quiet -dumpbase
ice-accessed-elt-2-of-tree_vec.ii -mtune=generic -auxbase
ice-accessed-elt-2-of-tree_vec -version -o /tmp/ccSsFbFa.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-accessed-elt-2-of-tree_vec.ii: In instantiation of ?C<int>?:
ice-accessed-elt-2-of-tree_vec.ii:11:   instantiated from here
ice-accessed-elt-2-of-tree_vec.ii:9: internal compiler error: tree check:
accessed elt 2 of tree_vec with 1 elts in tsubst, at cp/pt.c:9248
--------------------

---------- 4.4.0 ----------
$ x86_64-linux-gnu-g++-4.4.x -v -c ice-accessed-elt-2-of-tree_vec.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++ --enable-checking
Thread model: posix
gcc version 4.4.0 20090413 (prerelease) (GCC)
COLLECT_GCC_OPTIONS='-v' '-c' '-shared-libgcc' '-mtune=generic'

/opt/software/gcc-x86_64/gcc-4.4.x/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/cc1plus
-fpreprocessed ice-accessed-elt-2-of-tree_vec.ii -quiet -dumpbase
ice-accessed-elt-2-of-tree_vec.ii -mtune=generic -auxbase
ice-accessed-elt-2-of-tree_vec -version -o /tmp/ccEdsa3a.s
GNU C++ (GCC) version 4.4.0 20090413 (prerelease) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.4.0 20090413 (prerelease), 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: 4c95a5cf24794a394976148039ecc611
ice-accessed-elt-2-of-tree_vec.ii: In instantiation of ?C<int>?:
ice-accessed-elt-2-of-tree_vec.ii:11:   instantiated from here
ice-accessed-elt-2-of-tree_vec.ii:9: error: ?C<W>::a? has incomplete type
ice-accessed-elt-2-of-tree_vec.ii:1: error: declaration of ?struct A<int*>?
--------------------


-- 
           Summary: ICE: tree check: accessed elt 2 of tree_vec with 1 elts
                    in tsubst, at cp/pt.c:9248
           Product: gcc
           Version: 4.5.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=39754


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]