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++/13950] New: [3.4/3.5 Regression] ICE on lookup of dependent base name


-----------------------------------------------------
template <class T> struct Base {};
template <class T> struct Derived: public Base<T> {
  typename Derived::template Base<double>* p1;
};

template struct Derived<void>;
-----------------------------------------------------
test.cc:3: error: no class template named `Base' in `struct Derived<T>'
test.cc:3: internal compiler error: tree check: expected class 't', have 'x' 
(error_mark) in cp_parser_class_name, at cp/parser.c:11594

The problem appears to be that make_typename_type does perform a name lookup 
within the currently open class, while cp_parser_template_name does not. I 
think they both have to agree on what to do. 

Besides, the lookup should not fail (see DR176, and g++.dg/tc1/dr176.C which I 
will soon submit). So this is both a rejects-valid and an ice-on-valid.

-- 
           Summary: [3.4/3.5 Regression] ICE on lookup of dependent base
                    name
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, rejects-valid, error-recovery
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: giovannibajo at libero dot it
                CC: gcc-bugs at gcc dot gnu dot org


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


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