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

             Bug #: 56238
           Summary: [4.8 regression] ICE in tree check: expected
                    record_type or union_type or qual_union_type, have
                    template_type_parm in lookup_conversions, at
                    cp/search.c:2515
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: ppluzhni...@google.com


Test case:

class A
{
    template < typename T > T& get ();
    template < typename T > class B
    {
        void RemovePoint (A& value)
        {
            static_cast < double >(value.get < T > ());
        }
    };
};

Compiles fine with 4.7.x, with 4.8 without -std=c++11.
ICE's with -std=c++11 using
g++ (GCC) 4.8.0 20130205 (experimental)

g++ -c t.ii -std=c++11 
t.ii: In member function ‘void A::B<T>::RemovePoint(A&)’:
t.ii:8:55: 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:2515
             static_cast < double >(value.get < T > ());
                                                       ^
0xc6159a tree_check_failed(tree_node const*, char const*, int, char const*,
...)
    ../../gcc/tree.c:8946
0x66c962 tree_check3
    ../../gcc/tree.h:3709
...

Google ref: b/8153313

Reply via email to