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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [template/] [spec35.C] - Blame information for rev 315

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

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/31923
2
// C++ DR 605 -- "...the linkage of an explicit specialization must be that of
3
// the template."
4
 
5
// { dg-require-weak "" }
6
// { dg-do compile { target i?86-*-* x86_64-*-* } }
7
 
8
template
9
static void f1 (T) { }
10
 
11
// { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IfEvT_" } }
12
template<>
13
void f1 (float) { }  // Expected to have static linkage
14
 
15
template
16
void f2 (T) { }
17
 
18
// { dg-final { scan-assembler ".glob(a|)l\[\t \]*_?_Z2f2IfEvT_" } }
19
template<>
20
void f2 (float) { }  // Expected to have global linkage
21
 
22
void instantiator ()
23
{
24
  // { dg-final { scan-assembler-not ".glob(a|)l\[\t \]*_?_Z2f1IiEvT_" } }
25
  f1(0);  // Expected to have static linkage
26
 
27
  // { dg-final { scan-assembler ".weak(_definition)?\[\t \]*_?_Z2f2IiEvT_" { target { ! { *-*-mingw* *-*-cygwin } } } } }
28
  f2(0);  // Expected to have weak global linkage
29
}

powered by: WebSVN 2.1.0

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