OSDN Git Service

2004-11-12 Mark Mitchell <mark@codesourcery.com>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / i386-signbit-3.c
1 /* PR optimization/8746 */
2 /* { dg-do run { target i?86-*-* } } */
3 /* { dg-forbid-option "-m64" } */
4 /* { dg-options "-O1 -mtune=i586" } */
5
6 extern void abort (void);
7
8 volatile int j;
9
10 void f0() { j=0; }
11 void f1() { j=1; }
12
13 int foo(int x)
14 {
15   if ((short int)(x&0x8000) > (short int)0)
16   {
17     f0();
18     return 0;
19   }
20   else
21   {
22     f1();
23     return 1;
24   }
25 }
26
27 int main(void)
28 {
29   if (foo(0x8000) != 1)
30     abort();
31
32    return 0;
33 }