PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / alpha / 980217-1.c
blob06ef4e808289c3a5318d501dcff6f7749300fa12
1 /* Test float on alpha. */
3 /* { dg-do run } */
4 /* { dg-options "-mieee -O2" } */
6 extern void abort(void);
7 extern int printf(const char *, ...);
9 typedef int int32_t __attribute__ ((__mode__ ( __SI__ ))) ;
10 typedef union
12 float value;
13 int32_t word;
14 } ieee_float_shape_type;
16 int isinff(float x)
18 int32_t ix,t;
19 ieee_float_shape_type gf_u;
20 gf_u.value = x;
21 ix = gf_u.word;
22 printf ("%x\n", ix);
23 t = ix & 0x7fffffff;
24 t ^= 0x7f800000;
25 t |= -t;
26 return ~(t >> 31) & (1 - ((ix & 0x80000000) >> 30));
29 int main ()
31 float x = 1.0 / 0.0;
32 int i = isinff (x);
34 if (i == 0)
35 abort ();
37 printf ("%d\n", i);
38 return 0;