diff options
Diffstat (limited to 'test/CodeGen/switch.c')
-rw-r--r-- | test/CodeGen/switch.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/switch.c b/test/CodeGen/switch.c index dc2d27b..8b94a09 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; + } +} |