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]

c++/10038: ICE when trying to access multilple nested template structs


>Number:         10038
>Category:       c++
>Synopsis:       ICE when trying to access multilple nested template structs
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 12 15:16:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Francis Maes
>Release:        gcc version 3.4 20030302 (experimental)
>Organization:
>Environment:
Debian GNU/Linux unstable i586 
>Description:
template<template< class > class F>
struct Func
{
  template<typename T>
  struct Value : public F<T> {};
};

template<typename X>
struct First {
  template<typename Y>
  struct Res_ {
    typedef X Res;
  };
  typedef Func<Res_> Res;
};

int main()
{
// this lines produces an ICE
  typedef First<int>::Res::Value<float>::Res a;
// with the following line, it compiles properly
//typedef First<int>::Res_<float>::Res a;
}
>How-To-Repeat:
just compile
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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