diff options
author | oliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-08 19:53:48 +0000 |
---|---|---|
committer | oliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-01-08 19:53:48 +0000 |
commit | f9b010cd62cfab230abe23e09816da30fec7ac45 (patch) | |
tree | 768a5f28d80c12bbe97060db5274bcc4a39dc4e3 | |
parent | f20a3b9d80b1ca2f209698edda802464449f91b8 (diff) | |
download | ppe42-gcc-f9b010cd62cfab230abe23e09816da30fec7ac45.tar.gz ppe42-gcc-f9b010cd62cfab230abe23e09816da30fec7ac45.zip |
* gcc.dg/20000108-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31286 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20000108-1.c | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e350c0dcb7e..5261760cb80 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-01-08 Alexandre Oliva <oliva@lsd.ic.unicamp.br> + + * gcc.dg/20000108-1.c: New test. + 2000-01-05 Nathan Sidwell <nathan@acm.org> * g++.old-deja/g++.ns/koenig8.C: New test. diff --git a/gcc/testsuite/gcc.dg/20000108-1.c b/gcc/testsuite/gcc.dg/20000108-1.c new file mode 100644 index 00000000000..4afbc0953d9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20000108-1.c @@ -0,0 +1,17 @@ +/* Copyright (C) 2000 Free Software Foundation. + + by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */ + +/* { dg-do run } */ +/* { dg-options "-O3" } */ + +void foo () {} /* unused, but essential to trigger the bug */ + +int main () { + int i; + /* use asms to prevent optimizations */ + /* i = -1; */ asm ("" : "=r" (i) : "0" (-1)); + /* i = 1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2)); + if (i != 1) + abort(); +} |