summaryrefslogtreecommitdiff
path: root/test/CodeGen/switch.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
committerDimitry Andric <dim@FreeBSD.org>2011-02-20 13:06:31 +0000
commitbca07a4524feb4edec581062d631a13116320a24 (patch)
treea9243275843fbeaa590afc07ee888e006b8d54ea /test/CodeGen/switch.c
parent998bc5802ecdd65ce3b270f6c69a8ae8557f0a10 (diff)
Notes
Diffstat (limited to 'test/CodeGen/switch.c')
-rw-r--r--test/CodeGen/switch.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/switch.c b/test/CodeGen/switch.c
index dc2d27bc16da..8b94a0976e6e 100644
--- a/test/CodeGen/switch.c
+++ b/test/CodeGen/switch.c
@@ -194,3 +194,20 @@ int f13(unsigned x) {
return 0;
}
}
+
+// Don't delete a basic block that we want to introduce later references to.
+// This isn't really specific to switches, but it's easy to show with them.
+// rdar://problem/8837067
+int f14(int x) {
+ switch (x) {
+
+ // case range so that the case block has no predecessors
+ case 0 ... 15:
+ // any expression which doesn't introduce a new block
+ (void) 0;
+ // kaboom
+
+ default:
+ return x;
+ }
+}