summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/static-forward-decl.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-05-27 04:58:01 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-05-27 04:58:01 +0000
commit078c963a310048f84d1d74d7ed09fd610238d87a (patch)
tree68c195e01ecc9cad6d65efe607eb01adc007c07c /clang/test/CodeGen/static-forward-decl.c
parent698e72ec2ce2e0d006b467855f3532f2d09235c3 (diff)
downloadbcm5719-llvm-078c963a310048f84d1d74d7ed09fd610238d87a.tar.gz
bcm5719-llvm-078c963a310048f84d1d74d7ed09fd610238d87a.zip
Add a more reliable check for whether a static declaration has already
been used. In preparation for the fix to PR2360, but also a minor bug in its own right. llvm-svn: 51583
Diffstat (limited to 'clang/test/CodeGen/static-forward-decl.c')
-rw-r--r--clang/test/CodeGen/static-forward-decl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGen/static-forward-decl.c b/clang/test/CodeGen/static-forward-decl.c
new file mode 100644
index 00000000000..8e0825cb6c8
--- /dev/null
+++ b/clang/test/CodeGen/static-forward-decl.c
@@ -0,0 +1,5 @@
+// RUN: clang %s -emit-llvm -o - -triple=i686-apple-darwin9 | grep "global i32 10"
+
+static int i;
+int*j=&i;
+static int i = 10;
OpenPOWER on IntegriCloud