aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.dg/attr_visibility3.d
blob: 32984287d89c8ed8c1a40d479dabb85d67cb1c47 (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
29
// { dg-do compile }
// { dg-require-visibility "" }
// { dg-require-dll "" }

import gcc.attributes;

@visibility("hidden")
export void func1(); // { dg-error ".func1. was declared .export." }

@visibility("hidden")
export void func2() { } // { dg-error ".func2. was declared .export." }

@visibility("default")
export void func3();

@visibility("default")
export void func4() { };

@visibility("hidden")
export struct type1 { } // { dg-error ".type1. was declared .export." }

@visibility("default")
export struct type2 { }

@visibility("hidden")
export class type3 { } // { dg-error ".type3. was declared .export." }

@visibility("default")
export class type4 { }