Commit 430b9e22 by Jakub Jelinek Committed by Jakub Jelinek

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
parent a8504f22
2013-03-14 Jakub Jelinek <jakub@redhat.com>
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.
......
......@@ -2,7 +2,7 @@
void foo (int);
int test ()
{
int a[N];
int a[N + 8];
unsigned i;
for (i = 0; i < N; i++)
......
......@@ -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" } } */
int toto()
{
int i, j, k;
int a[100][100];
int a[100][200];
int b[100];
for (i = 1; i < 100; i++)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment