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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [explicit53.C] - Blame information for rev 749

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
extern "C" void abort ();
3
 
4
template  inline int fact ();
5
template <> inline int fact<1> ();
6
 
7
template  inline int fact ()
8
{
9
  return a * fact ();
10
}
11
 
12
template <> inline int fact<1> ()
13
{
14
  return 1;
15
}
16
 
17
int main()
18
{
19
  if (fact<3> () != 6 || fact<1> () != 1
20
      || fact<3> () != 6 || fact<1> () != 1 || fact<1+0> () != 1)
21
    abort ();
22
}

powered by: WebSVN 2.1.0

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