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

francis.maes@lrde.epita.fr francis.maes@lrde.epita.fr
Wed Mar 12 15:35:00 GMT 2003


>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:



More information about the Gcc-bugs mailing list