summaryrefslogtreecommitdiff
path: root/test/CodeGen/ms-declspecs.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ms-declspecs.c')
-rw-r--r--test/CodeGen/ms-declspecs.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/CodeGen/ms-declspecs.c b/test/CodeGen/ms-declspecs.c
index 5dc7787b8fb9..c32733e65ff6 100644
--- a/test/CodeGen/ms-declspecs.c
+++ b/test/CodeGen/ms-declspecs.c
@@ -2,8 +2,14 @@
__declspec(selectany) int x1 = 1;
const __declspec(selectany) int x2 = 2;
-// CHECK: @x1 = weak_odr global i32 1, align 4
-// CHECK: @x2 = weak_odr constant i32 2, align 4
+// CHECK: @x1 = weak_odr global i32 1, comdat, align 4
+// CHECK: @x2 = weak_odr constant i32 2, comdat, align 4
+
+// selectany turns extern variable declarations into definitions.
+__declspec(selectany) int x3;
+extern __declspec(selectany) int x4;
+// CHECK: @x3 = weak_odr global i32 0, comdat, align 4
+// CHECK: @x4 = weak_odr global i32 0, comdat, align 4
struct __declspec(align(16)) S {
char x;