From 430b9e22a7e0de45bff4b8ff45a4212e041e7bf8 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 14 Mar 2013 11:54:38 +0100 Subject: re PR tree-optimization/53265 (Warn when undefined behavior implies smaller iteration count) PR tree-optimization/53265 * gcc.dg/graphite/scop-3.c (toto): Increase array size to avoid undefined behavior. * gcc.dg/graphite/id-6.c (test): Likewise. * gcc.dg/graphite/pr35356-2.c: Adjust regexp patterns to only look for MIN_EXPR and MAX_EXPR in GIMPLE stmts. From-SVN: r196655 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/gcc.dg/graphite/id-6.c | 2 +- gcc/testsuite/gcc.dg/graphite/pr35356-2.c | 4 ++-- gcc/testsuite/gcc.dg/graphite/scop-3.c | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'gcc') diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19fab0e..e3b4988 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,6 +1,13 @@ 2013-03-14 Jakub Jelinek PR tree-optimization/53265 + * gcc.dg/graphite/scop-3.c (toto): Increase array size to avoid + undefined behavior. + * gcc.dg/graphite/id-6.c (test): Likewise. + * gcc.dg/graphite/pr35356-2.c: Adjust regexp patterns to only look for + MIN_EXPR and MAX_EXPR in GIMPLE stmts. + + PR tree-optimization/53265 * gcc.dg/pr53265.c: New test. * gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations to dg-options. diff --git a/gcc/testsuite/gcc.dg/graphite/id-6.c b/gcc/testsuite/gcc.dg/graphite/id-6.c index c3aab43..dd6fecd 100644 --- a/gcc/testsuite/gcc.dg/graphite/id-6.c +++ b/gcc/testsuite/gcc.dg/graphite/id-6.c @@ -2,7 +2,7 @@ void foo (int); int test () { - int a[N]; + int a[N + 8]; unsigned i; for (i = 0; i < N; i++) diff --git a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c index 66cfdea..b406d10 100644 --- a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c +++ b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c @@ -39,6 +39,6 @@ foo (int bar, int n, int k) */ -/* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "graphite" } } */ -/* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "MIN_EXPR\[^\\n\\r]*;" 4 "graphite" } } */ +/* { dg-final { scan-tree-dump-times "MAX_EXPR\[^\\n\\r]*;" 4 "graphite" } } */ /* { dg-final { cleanup-tree-dump "graphite" } } */ diff --git a/gcc/testsuite/gcc.dg/graphite/scop-3.c b/gcc/testsuite/gcc.dg/graphite/scop-3.c index e20bfdc..18917c0 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-3.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-3.c @@ -1,7 +1,7 @@ int toto() { int i, j, k; - int a[100][100]; + int a[100][200]; int b[100]; for (i = 1; i < 100; i++) -- cgit v1.1