aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-04 00:47:12 +0000
committerChris Lattner <sabre@nondot.org>2006-03-04 00:47:12 +0000
commit4d945177961ce36725ce3f5416cb3d1a28c9e82f (patch)
tree2cb668b28f688ac194434a80081c5a23bbd3009f /test/CFrontend
parentf0afc2cda20799ccb8af0cca2dd0d3042ad6aa35 (diff)
downloadexternal_llvm-4d945177961ce36725ce3f5416cb3d1a28c9e82f.zip
external_llvm-4d945177961ce36725ce3f5416cb3d1a28c9e82f.tar.gz
external_llvm-4d945177961ce36725ce3f5416cb3d1a28c9e82f.tar.bz2
New testcase, make sure nate doesn't vanish
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26511 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2006-03-03-MissingInitializer.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CFrontend/2006-03-03-MissingInitializer.c b/test/CFrontend/2006-03-03-MissingInitializer.c
new file mode 100644
index 0000000..f0e6bd7
--- /dev/null
+++ b/test/CFrontend/2006-03-03-MissingInitializer.c
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc %s -S -o - | gccas | llvm-dis | grep nate | grep 'global int 0'
+
+struct X { int *XX; int Y;};
+
+void foo() {
+ static int nate = 0;
+ struct X bob = { &nate, 14 };
+ bar(&bob);
+}
+