OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [parse/] [crash11.C] - Rev 693

Compare with Previous | Blame | View Log

// { dg-do compile }

// Origin: priesnit@math.uni-goettingen.de

// PR c++/5767: ICE parsing typename with invalid scope.

template <template <typename> class TP>
struct A
{
  template <typename T>
  struct Template
  {
    typedef typename TP<T>::Type Type;
  };
};
template <template <typename> class TP>
struct B
{
  template <typename T>
  struct Template
  {
    typedef typename A<A<TP>::Template>  // { dg-error "mismatch|class template" }
      ::template Template<T>::Type Type; // { dg-error "" }
  };
};
template <typename T>
struct C
{
  typedef void Type;
};
int main()
{
  typedef B<C>::Template<void>::Type Type; // { dg-error "does not name a type" }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.