| 1 |
/* { dg-do run { target fpic } } */ |
| 2 |
/* { dg-options "-O2 -fpic" } */ |
| 3 |
|
| 4 |
extern void abort (void); |
| 5 |
extern void exit (int); |
| 6 |
|
| 7 |
void foo (char *x, const char *y, ...) |
| 8 |
{ |
| 9 |
} |
| 10 |
|
| 11 |
double bar (const char *x, long y) |
| 12 |
{ |
| 13 |
return 0.0; |
| 14 |
} |
| 15 |
|
| 16 |
typedef __SIZE_TYPE__ size_t; |
| 17 |
extern size_t strlen (const char *); |
| 18 |
|
| 19 |
double baz (const char *x) |
| 20 |
{ |
| 21 |
if (x[0] != '\0') |
| 22 |
{ |
| 23 |
char y[6 + strlen (x)]; |
| 24 |
foo (y, "FOO", x); |
| 25 |
return bar (y, 0); |
| 26 |
} |
| 27 |
|
| 28 |
return (__extension__ ((union { unsigned __l __attribute__((__mode__(__SI__))); float __d; }) { __l: 0x3f800000UL }).__d); |
| 29 |
} |
| 30 |
|
| 31 |
int |
| 32 |
main () |
| 33 |
{ |
| 34 |
if (baz("") != 1.0) |
| 35 |
abort (); |
| 36 |
exit (0); |
| 37 |
} |