diff options
author | Janis Johnson <janis187@us.ibm.com> | 2002-01-23 18:54:27 +0000 |
---|---|---|
committer | Janis Johnson <janis@gcc.gnu.org> | 2002-01-23 18:54:27 +0000 |
commit | a84357163096062917bdccb91ba4954cb7ec8b4d (patch) | |
tree | af81d93c3edf00da262adfe4e1b508355a874181 | |
parent | 0a01c261ff1b467cb5c706858bd444c34000fb1a (diff) | |
download | gcc-a84357163096062917bdccb91ba4954cb7ec8b4d.zip gcc-a84357163096062917bdccb91ba4954cb7ec8b4d.tar.gz gcc-a84357163096062917bdccb91ba4954cb7ec8b4d.tar.bz2 |
* gcc.dg/20020122-3.c: New test.
From-SVN: r49148
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20020122-3.c | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 22bc8a9..7a338d1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-01-23 Janis Johnson <janis187@us.ibm.com> + + * gcc.dg/20020122-3.c: New. + 2002-01-23 Jakub Jelinek <jakub@redhat.com> * g++.dg/other/gc1.C: New test. diff --git a/gcc/testsuite/gcc.dg/20020122-3.c b/gcc/testsuite/gcc.dg/20020122-3.c new file mode 100644 index 0000000..42a4605 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20020122-3.c @@ -0,0 +1,15 @@ +/* Check that the combination of -Os and -fprefetch-loop-arrays does not + cause the compiler to crash, which it originally did on i?86. + Warnings are turned off because not all targets support prefetch. */ + +/* { dg-do compile } */ +/* { dg-options "-Os -fprefetch-loop-arrays -w" } */ +/* { dg-options "-Os -fprefetch-loop-arrays -mcpu=pentium3 -w" { target i?86-*-* } } */ + +int foo (int *p, int n) +{ + int i, r; + for (i = 0; i < n; i++) + r += p[i]; + return r; +} |