summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-16 08:49:48 +0000
committerChris Lattner <sabre@nondot.org>2004-03-16 08:49:48 +0000
commit91d855f150588d3b8d1772c628b26e24a960bfee (patch)
tree3c123ae2f553d2a69f94023ea1c3ff0478797e77
parente1f5161c18c79c2c37e6822a1c57be982077ae5e (diff)
downloadllvm-91d855f150588d3b8d1772c628b26e24a960bfee.tar.gz
New testcase
llvm-svn: 12437
-rw-r--r--llvm/test/Regression/CFrontend/2004-03-15-SimpleIndirectGoto.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/llvm/test/Regression/CFrontend/2004-03-15-SimpleIndirectGoto.c b/llvm/test/Regression/CFrontend/2004-03-15-SimpleIndirectGoto.c
new file mode 100644
index 000000000000..38ce086f2e2f
--- /dev/null
+++ b/llvm/test/Regression/CFrontend/2004-03-15-SimpleIndirectGoto.c
@@ -0,0 +1,21 @@
+int code[]={0,0,0,0,1};
+void foo(int x) {
+ volatile int b;
+ b = 0xffffffff;
+}
+void bar(int *pc) {
+ static const void *l[] = {&&lab0, &&end};
+
+ foo(0);
+ goto *l[*pc];
+ lab0:
+ foo(0);
+ pc++;
+ goto *l[*pc];
+ end:
+ return;
+}
+int main() {
+ bar(code);
+ return 0;
+}