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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

// { dg-options "-fno-pretty-templates" }

template <class T, int N=0, int X=1>
struct A
{
  struct AN;
};

void foo(void)
{
  A<void> a = 0;                // { dg-error "A<void, 0, 1>" }
}

template <class T> T f(T);          // { dg-message "int f<int>.int." }
template <class T> T f(T, int = 0); // { dg-message "" }

template <class T>
struct B
{
  typedef typename T::AN BN;

  BN f();                       // { dg-message "AN" }
  BN f(int = 0);                // { dg-message "" }
};

int main()
{
  f(1);                         // { dg-error "" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 28 }
  B<A<int> >().f();             // { dg-error "" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 30 }
}

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.