summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/init.c')
-rw-r--r--clang/test/CodeGen/init.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/test/CodeGen/init.c b/clang/test/CodeGen/init.c
index fa39ba6f5a0..b53b81edb8b 100644
--- a/clang/test/CodeGen/init.c
+++ b/clang/test/CodeGen/init.c
@@ -1,4 +1,5 @@
-// RUN: clang -emit-llvm %s -o -
+// RUN: clang -triple i386-unknown-unknown -emit-llvm %s -o %t &&
+
void f1() {
// Scalars in braces.
int a = { 1 };
@@ -20,3 +21,11 @@ void f3() {
struct S a[1] = { { foo } };
}
+// Constants
+// RUN: grep '@g3 = constant i32 10' %t &&
+// RUN: grep '@f4.g4 = internal constant i32 12' %t
+const int g3 = 10;
+int f4() {
+ static const int g4 = 12;
+ return g4;
+}
OpenPOWER on IntegriCloud