Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ext/visibility/ref-temp1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
// PR c++/91476 // Test that hidden and internal visibility propagates to reference temps. #define HIDDEN __attribute((visibility("hidden"))) // { dg-final { scan-hidden "_ZGRZ1fvE3foo_" } } HIDDEN inline const int* f() { static const int &foo = 1; return &foo; } // { dg-final { scan-assembler-not "(weak|globl)\[^\n\]*_ZGRN12_GLOBAL__N_13fooE_" } } namespace { const int &foo = 1; } const void *volatile p; int main() { p = f(); p = &foo; }