annotate gcc/testsuite/g++.dg/ext/dllimport5.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
kono
parents:
diff changeset
2 // Report error if static symbol definition has dllimport attribute.
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 __attribute__((dllimport))
kono
parents:
diff changeset
5 int impvar; // OK, implicit "extern"
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 static __attribute__((dllimport))
kono
parents:
diff changeset
8 int static_impvar; // { dg-error "external linkage" }
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 static __attribute__((dllexport))
kono
parents:
diff changeset
11 int static_expvar; // { dg-error "external linkage" }
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 static __attribute__((dllimport))
kono
parents:
diff changeset
14 void static_impfun(void); // { dg-error "external linkage" }
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 void foo()
kono
parents:
diff changeset
17 {
kono
parents:
diff changeset
18 __attribute__((dllimport))
kono
parents:
diff changeset
19 int foovar; // OK, implicit "extern"
kono
parents:
diff changeset
20 foovar++;
kono
parents:
diff changeset
21 }
kono
parents:
diff changeset
22
kono
parents:
diff changeset
23 void bar()
kono
parents:
diff changeset
24 {
kono
parents:
diff changeset
25 __attribute__((dllexport))
kono
parents:
diff changeset
26 int barvar; // { dg-error "external linkage" }
kono
parents:
diff changeset
27 barvar++;
kono
parents:
diff changeset
28 }