aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ext/visibility/assign1.C
blob: b25999e8ee96e295aff05ebb4298c0c23b78ea65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-require-visibility "" } */
/* { dg-final { scan-hidden "_ZN1DaSERKS_" } } */

struct B {
  B& operator=(const B&);
};

struct __attribute__((visibility("hidden"))) D : public B {
  // The implicit assignment operator should be hidden.
};

__attribute__((visibility("hidden"))) D d1;
__attribute__((visibility("hidden"))) D d2;

void f() {
  d1 = d2;
}