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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [visibility/] [template3.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR c++/17470
2
// Test that we can give visibility to explicit template instantiations
3
 
4
// { dg-require-visibility "" }
5
// { dg-final { scan-hidden "_ZN1AIlE1fEl" } }
6
// { dg-final { scan-hidden "_ZN1AIiE1fEi" } }
7
// { dg-final { scan-not-hidden "_ZN1AIcE1fEc" } }
8
// { dg-final { scan-hidden "_Z8identityIdET_S0_" } }
9
// { dg-final { scan-not-hidden "_Z8identityIiET_S0_" } }
10
 
11
template  T identity(T t) { return t; }
12
template  __attribute__((visibility("hidden"))) double identity(double);
13
template int identity(int);
14
 
15
 
16
template  struct A { void f (T); };
17
template  void A::f (T) { }
18
template struct __attribute ((visibility ("hidden"))) A;
19
template<> struct  __attribute ((visibility ("hidden"))) A { void f(long); };
20
// inherits hidden visibility from its class
21
void A::f (long) { }
22
template struct A;

powered by: WebSVN 2.1.0

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