Commit 4e2199ab by Mark Mitchell Committed by Nathan Froyd

vect-105.c: Prevent compiler from hoisting abort out of loop.

	* gcc.dg/vect/vect-105.c: Prevent compiler from hoisting abort
	out of loop.

From-SVN: r143378
parent 5321dace
2009-01-14 Mark Mitchell <mark@codesourcery.com>
* gcc.dg/vect/vect-105.c: Prevent compiler from hoisting abort
out of loop.
2009-01-14 Richard Guenther <rguenther@suse.de> 2009-01-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/38826 PR tree-optimization/38826
......
...@@ -16,6 +16,8 @@ static int a[N][N] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}}; ...@@ -16,6 +16,8 @@ static int a[N][N] = {{1,2,3,11},{4,5,6,12},{7,8,9,13},{34,45,67,83}};
static int b[N][N] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}}; static int b[N][N] = {{17,28,15,23},{0,2,3,24},{4,31,82,25},{29,31,432,256}};
static int c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}}; static int c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}};
volatile int y;
__attribute__ ((noinline)) __attribute__ ((noinline))
int main1 (int x) { int main1 (int x) {
int i,j; int i,j;
...@@ -28,7 +30,9 @@ int main1 (int x) { ...@@ -28,7 +30,9 @@ int main1 (int x) {
{ {
p->a[i][j] = a[i][j]; p->a[i][j] = a[i][j];
p->b[i][j] = b[i][j]; p->b[i][j] = b[i][j];
if (x == 135) /* Because Y is volatile, the compiler cannot move this check out
of the loop. */
if (y)
abort (); /* to avoid vectorization */ abort (); /* to avoid vectorization */
} }
} }
......
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