aboutsummaryrefslogtreecommitdiffstats
path: root/test/CFrontend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-08 18:48:27 +0000
committerChris Lattner <sabre@nondot.org>2002-04-08 18:48:27 +0000
commit0bfaf3b7b54aee97c6d0c4c9d7e483350eac4722 (patch)
tree651e2eb7f2efe82f1c360bb112a254414fde5115 /test/CFrontend
parent74550e1d06a53b27d48b9e11bfeb645ddf50ef14 (diff)
downloadexternal_llvm-0bfaf3b7b54aee97c6d0c4c9d7e483350eac4722.zip
external_llvm-0bfaf3b7b54aee97c6d0c4c9d7e483350eac4722.tar.gz
external_llvm-0bfaf3b7b54aee97c6d0c4c9d7e483350eac4722.tar.bz2
Checkin old testcase for switch statement. For now we just decimate them
to conditional branches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2159 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r--test/CFrontend/2002-04-07-SwitchStmt.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CFrontend/2002-04-07-SwitchStmt.c b/test/CFrontend/2002-04-07-SwitchStmt.c
new file mode 100644
index 0000000..178076c
--- /dev/null
+++ b/test/CFrontend/2002-04-07-SwitchStmt.c
@@ -0,0 +1,20 @@
+int printf(const char *, ...);
+int foo();
+
+int main() {
+ while (foo()) {
+ switch (foo()) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ printf("3");
+ case 4: printf("4");
+ case 5:
+ case 6:
+ default:
+ break;
+ }
+ }
+ return 0;
+}