| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-Ofast -fdump-tree-cplxlower1" } */ |
| 3 |
|
| 4 |
double f(double a, double c) |
| 5 |
{ |
| 6 |
_Complex double d = __builtin_complex (a, a); |
| 7 |
d+=__builtin_complex(1.0, 1.0); |
| 8 |
return __builtin_cabs(d); |
| 9 |
} |
| 10 |
|
| 11 |
/* Check that cabs is expanded during complex lowering and there is no sqrt (since it is a constant). */ |
| 12 |
/* { dg-final { scan-tree-dump-not "__builtin_cabs " "cplxlower1" } } */ |
| 13 |
/* { dg-final { scan-tree-dump-not "__builtin_sqrt " "cplxlower1" } } */ |
| 14 |
/* { dg-final { scan-tree-dump-times "ABS_EXPR <" 1 "cplxlower1" } } */ |
| 15 |
|
| 16 |
|