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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [partial1.C] - Blame information for rev 696

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// Origin: Jo Totland 
3
 
4
// PR c++/6620
5
// Partial specialization involving expression of non-type template
6
// parameter causes ICE.
7
 
8
extern "C" void abort();
9
 
10
template  struct HoldInt
11
{
12
};
13
 
14
template  struct Add
15
{
16
};
17
 
18
template  struct Add, HoldInt<-N> >
19
{
20
  typedef int type;
21
  int f() { return 0; }
22
};
23
 
24
template 
25
struct Add, HoldInt >
26
{
27
  typedef HoldInt type;
28
  int f() { return 1; }
29
};
30
 
31
int main() {
32
  Add, HoldInt<-1> > a;
33
  Add, HoldInt<-2> > b;
34
  if (a.f() != 0 || b.f() != 1)
35
    abort();
36
}

powered by: WebSVN 2.1.0

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