summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/staticinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/staticinit.c')
-rw-r--r--clang/test/CodeGen/staticinit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/CodeGen/staticinit.c b/clang/test/CodeGen/staticinit.c
index e226179768c..50c837a1c2f 100644
--- a/clang/test/CodeGen/staticinit.c
+++ b/clang/test/CodeGen/staticinit.c
@@ -1,4 +1,4 @@
-// RUN: clang -emit-llvm %s
+// RUN: clang -emit-llvm < %s | grep "g.b = internal global i8. getelementptr"
struct AStruct {
int i;
@@ -13,3 +13,8 @@ void f() {
static char* strs[] = { "one", "two", "three", "four" };
static struct AStruct myStruct = { 1, "two", 3.0 };
}
+
+void g() {
+ static char a[10];
+ static char *b = a;
+}
OpenPOWER on IntegriCloud