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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.ns/] [template5.C] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
//Check whether namespace-scoped template instantiations
3
//are mangled differently.
4
 
5
namespace X{
6
  template
7
  struct Y{
8
   int f(T){
9
     return 1;
10
   }
11
   templatevoid g(){}
12
  };
13
}
14
 
15
template
16
struct Y{
17
  int f(T){
18
    return 2;
19
  }
20
};
21
 
22
int main()
23
{
24
  X::Y z;
25
  if (z.f(4) != 1)
26
    return 1;
27
  z.g();
28
 
29
  Y z1;
30
  if (z1.f(5) != 2)
31
    return 1;
32
  return 0;
33
}
34
 

powered by: WebSVN 2.1.0

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