summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/20000108-1.c
diff options
context:
space:
mode:
authoroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-08 19:53:48 +0000
committeroliva <oliva@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-08 19:53:48 +0000
commitf9b010cd62cfab230abe23e09816da30fec7ac45 (patch)
tree768a5f28d80c12bbe97060db5274bcc4a39dc4e3 /gcc/testsuite/gcc.dg/20000108-1.c
parentf20a3b9d80b1ca2f209698edda802464449f91b8 (diff)
downloadppe42-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
Diffstat (limited to 'gcc/testsuite/gcc.dg/20000108-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/20000108-1.c17
1 files changed, 17 insertions, 0 deletions
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();
+}
OpenPOWER on IntegriCloud