From 1006463067f23fcc6b189ed157ce7d60b71efede Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 8 Apr 2013 15:46:48 +0200 Subject: [PATCH] * gcc.c-torture/execute/pr56837.c: New test. From-SVN: r197582 --- gcc/testsuite/ChangeLog | 2 ++ gcc/testsuite/gcc.c-torture/execute/pr56837.c | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr56837.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5eb5f7d5743..dcf0d580649 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2013-04-08 Jakub Jelinek + * gcc.c-torture/execute/pr56837.c: New test. + PR c++/34949 PR c++/50243 * g++.dg/opt/vt3.C: New test. diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56837.c b/gcc/testsuite/gcc.c-torture/execute/pr56837.c new file mode 100644 index 00000000000..a6ce2af71ad --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr56837.c @@ -0,0 +1,21 @@ +extern void abort (void); +_Complex int a[1024]; + +__attribute__((noinline, noclone)) void +foo (void) +{ + int i; + for (i = 0; i < 1024; i++) + a[i] = -1; +} + +int +main () +{ + int i; + foo (); + for (i = 0; i < 1024; i++) + if (a[i] != -1) + abort (); + return 0; +}