]> granicus.if.org Git - clang/commitdiff
Add test forgotten in r314262.
authorErich Keane <erich.keane@intel.com>
Wed, 27 Sep 2017 03:23:02 +0000 (03:23 +0000)
committerErich Keane <erich.keane@intel.com>
Wed, 27 Sep 2017 03:23:02 +0000 (03:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314268 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGenCXX/extern-section-attribute.cpp [new file with mode: 0644]

diff --git a/test/CodeGenCXX/extern-section-attribute.cpp b/test/CodeGenCXX/extern-section-attribute.cpp
new file mode 100644 (file)
index 0000000..fa0227e
--- /dev/null
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu | FileCheck %s
+
+extern int aa __attribute__((section(".sdata")));
+// CHECK-DAG: @aa = external global i32, section ".sdata", align 4
+
+extern int bb __attribute__((section(".sdata"))) = 1;
+// CHECK-DAG: @bb = global i32 1, section ".sdata", align 4
+
+int foo() {
+  return aa + bb;
+}