OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [visibility-1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
/* Test visibility attribute on template member function
2
   instantiations. */
3
 
4
/* { dg-do compile } */
5
/* { dg-options "-fvisibility=hidden" } */
6
/* { dg-require-visibility "" } */
7
/* { dg-final { scan-not-hidden "_ZN7myClassIiE3maxEii" } } */
8
 
9
#define EXPORT __attribute__((visibility("default")))
10
 
11
template 
12
class EXPORT myClass {
13
public:
14
  T max (T t1, T t2);
15
};
16
 
17
template 
18
T myClass::max (T t1, T t2) {
19
  return (t1 > t2 ? t1 : t2);
20
}
21
 
22
template class myClass;

powered by: WebSVN 2.1.0

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