summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/test/FrontendC/2010-03-5-LexicalScope.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/FrontendC/2010-03-5-LexicalScope.c b/llvm/test/FrontendC/2010-03-5-LexicalScope.c
new file mode 100644
index 00000000000..93a841a8f29
--- /dev/null
+++ b/llvm/test/FrontendC/2010-03-5-LexicalScope.c
@@ -0,0 +1,10 @@
+// RUN: %llvmgcc -S -O0 -g %s -o - | grep DW_TAG_lexical_block | count 3
+int foo(int i) {
+ if (i) {
+ int j = 2;
+ }
+ else {
+ int j = 3;
+ }
+ return i;
+}
OpenPOWER on IntegriCloud