From 52ab84f7252f86f297a78a426b60355aafb5b097 Mon Sep 17 00:00:00 2001 From: No Author Date: Wed, 3 Mar 2004 00:34:49 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'gcc-3_3-branch'. From-SVN: r78800 --- .../gcc.c-torture/execute/20040302-1.c | 24 +++++++++++++++++++ gcc/testsuite/gcc.dg/inline-5.c | 13 ++++++++++ 2 files changed, 37 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20040302-1.c create mode 100644 gcc/testsuite/gcc.dg/inline-5.c diff --git a/gcc/testsuite/gcc.c-torture/execute/20040302-1.c b/gcc/testsuite/gcc.c-torture/execute/20040302-1.c new file mode 100644 index 000000000000..07056c43f4e3 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040302-1.c @@ -0,0 +1,24 @@ +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; +} diff --git a/gcc/testsuite/gcc.dg/inline-5.c b/gcc/testsuite/gcc.dg/inline-5.c new file mode 100644 index 000000000000..d72fad656100 --- /dev/null +++ b/gcc/testsuite/gcc.dg/inline-5.c @@ -0,0 +1,13 @@ +/* PR middle-end/13448 */ + +/* { dg-options "-O3" } */ + +void funct (const int n) +{ + n++; /* { dg-error "" } */ +} + +int main () { + funct (1); + return 0; +} -- 2.47.2