diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/visibility/anon3.C')
-rw-r--r-- | gcc/testsuite/g++.dg/ext/visibility/anon3.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon3.C b/gcc/testsuite/g++.dg/ext/visibility/anon3.C new file mode 100644 index 000000000..9def559d2 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/visibility/anon3.C @@ -0,0 +1,16 @@ +// PR c++/31187 +// Bug: the repeated declaration was confusing the compiler into +// thinking that foo1 had language internal linkage. + +class foo { }; + +namespace +{ + extern foo foo1; + foo foo1; +} + +template< foo * > +class bar { }; + +bar< &foo1 > bar1; |