2 // Test that hidden and internal visibility propagates to reference temps.
3 // { dg-require-visibility "" }
5 #define HIDDEN __attribute((visibility("hidden")))
7 // { dg-final { scan-hidden "_ZGRZ1fvE3foo_" } }
8 HIDDEN inline const int* f() { static const int &foo = 1; return &foo; }
10 // { dg-final { scan-assembler-not "(weak|globl)\[^\n\]*_ZGRN12_GLOBAL__N_13fooE_" } }
11 namespace { const int &foo = 1; }
13 const void *volatile p;