aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/visibility/typeinfo1.C
blob: 99dfc1cd76deea64fedc7bab38670b58a55621d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// PR c++/26984
// lazily generated typeinfos should not be affected by #pragma vis, but
// they should be affected by the visibility of the type they describe.

// { dg-require-visibility "" }
// { dg-options "-fvisibility-inlines-hidden" }
// { dg-final { scan-not-hidden "_ZTIPPi" } }
// { dg-final { scan-not-hidden "_ZTSPPi" } }
// { dg-final { scan-hidden "_ZTIP1A" } }
// { dg-final { scan-hidden "_ZTSP1A" } }

#include <typeinfo>

#pragma GCC visibility push(hidden)
const std::type_info* t = &(typeid(int **));
struct A { };
#pragma GCC visibility pop

const std::type_info* t2 = &(typeid(A *));