summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/visibility/anon6.C
blob: 951de4964e4fa4bbd6c8b48e2b0afe1415f5491c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// PR c++/33094
// { dg-final { scan-assembler "1BIiE1cE" } }
// { dg-final { scan-assembler-not "globl.*1BIiE1cE" } }
// { dg-final { scan-assembler-not "1CIiE1cE" } }

// Test that B<int>::c is emitted as an internal symbol, and C<int>::c is
// not emitted.

namespace
{
  template <typename T>
  class A
  {
    virtual T f1() { return c; }
    static const T c = 0;
  };

  template <typename T>
  class B
  {
    static const T c = 0;
  };

  template <typename T> const T B<T>::c;

  template class A<int>;
  template class B<int>;
}