diff options
| author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-14 17:54:07 +0000 |
|---|---|---|
| committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-01-14 17:54:07 +0000 |
| commit | bd3e816a36d72e7254f6e2c8be5ff157184f781e (patch) | |
| tree | a0df01ed0152c1baa793d547f4b70450e0fbb2f6 | |
| parent | ce5574cc6d3843ea817a2fe25f3271a54d202a5b (diff) | |
| download | ppe42-gcc-bd3e816a36d72e7254f6e2c8be5ff157184f781e.tar.gz ppe42-gcc-bd3e816a36d72e7254f6e2c8be5ff157184f781e.zip | |
* gcc.dg/vect/vect-105.c: Prevent compiler from hoisting abort
out of loop.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143378 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/vect/vect-105.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8432ec6cdfe..57e8d9c8e67 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +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> PR tree-optimization/38826 diff --git a/gcc/testsuite/gcc.dg/vect/vect-105.c b/gcc/testsuite/gcc.dg/vect/vect-105.c index eb21b160cff..bbf42af897f 100644 --- a/gcc/testsuite/gcc.dg/vect/vect-105.c +++ b/gcc/testsuite/gcc.dg/vect/vect-105.c @@ -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 c[N][N] = {{1,2,3,11},{4,9,13,34},{45,67,83,13},{34,45,67,83}}; +volatile int y; + __attribute__ ((noinline)) int main1 (int x) { int i,j; @@ -28,7 +30,9 @@ int main1 (int x) { { p->a[i][j] = a[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 */ } } |

