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

           Summary: [4.6 Regression] [C++0x] ICE: tree check: expected
                    record_type or union_type or qual_union_type, have
                    template_type_parm in lookup_conversions, at
                    cp/search.c:2452
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: zso...@seznam.cz


------ testcase.C ------
extern int array[];

template < typename T > 
void foo (T t)
{
  array[(unsigned)t];
}
------------------------

Compiler output:
$ gcc -std=c++0x testcase.C
testcase.C: In function 'void foo(T)':
testcase.C:6:21: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_type_parm in lookup_conversions,
at cp/search.c:2452
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r167954 - crash
r167898 - crash
r165699 - OK
4.5 r166509 - OK

Reply via email to