diff options
author | Richard Henderson <rth@redhat.com> | 2004-08-11 21:09:57 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-08-11 21:09:57 -0700 |
commit | 174283a3c26828ee2bf0acd05f6350f439beefcc (patch) | |
tree | 0cb6f5299b432c6f23ca205a73d8654219b13413 /gcc/testsuite/gcc.c-torture | |
parent | 159319544b909404d2ba3997c58a0cbe6541030a (diff) | |
download | gcc-174283a3c26828ee2bf0acd05f6350f439beefcc.zip gcc-174283a3c26828ee2bf0acd05f6350f439beefcc.tar.gz gcc-174283a3c26828ee2bf0acd05f6350f439beefcc.tar.bz2 |
c-common.h (STATEMENT_LIST_HAS_LABEL): New.
* c-common.h (STATEMENT_LIST_HAS_LABEL): New.
* c-semantics.c (add_stmt): Set it.
* c-decl.c (finish_decl): Use it to create a new BIND_EXPR
before instantiating a variable sized type.
From-SVN: r85849
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20040811-1.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040811-1.c b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c new file mode 100644 index 0000000..62f377a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20040811-1.c @@ -0,0 +1,19 @@ +/* Ensure that we deallocate X when branching back before its + declaration. */ + +void *volatile p; + +int +main (void) +{ + int n = 0; + lab:; + int x[n % 1000 + 1]; + x[0] = 1; + x[n % 1000] = 2; + p = x; + n++; + if (n < 1000000) + goto lab; + return 0; +} |