In gcc/testsuite/: 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / 20000108-1.c
blob4391be2ad8ebbc7c0c48e48a9c309fd91091a31e
1 /* Copyright (C) 2000 Free Software Foundation.
3 by Alexandre Oliva <oliva@lsd.ic.unicamp.br> */
5 /* { dg-do run } */
6 /* { dg-options "-O3" } */
8 extern void abort (void);
10 void foo () {} /* unused, but essential to trigger the bug */
12 int main () {
13 int i;
14 /* use asms to prevent optimizations */
15 /* i = -1; */ asm ("" : "=r" (i) : "0" (-1));
16 /* i = 1; */ asm ("" : "=r" (i) : "0" (i ? 1 : 2));
17 if (i != 1)
18 abort();
19 return 0;