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/] [guard1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-options "-fvisibility=hidden" }
2
// { dg-require-visibility "" }
3
// { dg-final { scan-not-hidden "_ZGVZN5otherclEvE4s_cd" } }
4
 
5
extern "C" int printf (const char *, ...);
6
 
7
#define DLLEXPORT __attribute__ ((visibility("default")))
8
 
9
struct class_data
10
{
11
  int apple;
12
  class_data() { printf("non trivial ctor\n"); }
13
};
14
 
15
struct DLLEXPORT other
16
{
17
  class_data* operator ()()
18
  {
19
    static class_data s_cd;
20
    return &s_cd;
21
  }
22
};
23
 
24
int main()
25
{
26
  other aFoo;
27
  aFoo();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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