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