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++.pt/] [explicit70.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do assemble  }
2
 
3
template 
4
void f(T) {}
5
 
6
template 
7
struct S {
8
  static T t;
9
};
10
 
11
template 
12
T S::t;
13
 
14
template void f(int);
15
template void f(int); // { dg-error "" } duplicate explicit instantiation
16
template int S::t;
17
template int S::t; // { dg-error "" } duplicate explicit instantiation
18
template class S;
19
template class S; // { dg-error "" } duplicate explicit instantiation
20
 
21
extern template void f(double); // { dg-warning "" } extern not allowed
22
inline template class S; // { dg-warning "" } inline not allowed
23
 
24
template 
25
struct S {};
26
 
27
template class S; // OK - explicit instantiation of partial
28
                         // specialization
29
 
30
template <>
31
struct S {};
32
 
33
template class S; // OK - explicit instantiation after
34
 
35
template <>
36
void f(long double) {}
37
 
38
template void f(long double); // OK - explicit instantiation after
39
 
40
template 
41
void g(T);
42
 
43
template void g(int); // { dg-error "" } no definition of g.

powered by: WebSVN 2.1.0

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