| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-additional-options "-std=gnu17" } */ |
| 3 |
|
| 4 |
struct singlecomplex { float real, imag ; } ; |
| 5 |
struct doublecomplex { double real, imag ; } ; |
| 6 |
struct extendedcomplex { long double real, imag ; } ; |
| 7 |
extern double cabs(); |
| 8 |
float cabsf(fc) |
| 9 |
struct singlecomplex fc; /* { dg-warning "doesn't match" } */ |
| 10 |
{ |
| 11 |
struct doublecomplex dc ; |
| 12 |
dc.real=fc.real; dc.imag=fc.imag; |
| 13 |
return (float) cabs(dc); /* { dg-warning "incompatible type for argument 1 of .cabs." } */ |
| 14 |
} |
| 15 |
|