libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / cabs-5.c
blobdd79407992100194954dfcdd7c1399cf5952ee3f
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-cplxlower1" } */
4 double f(double a, double c)
6 _Complex double b = a;
7 b+= c;
8 return __builtin_cabs(b);
11 double f1(double a, double c)
13 _Complex double b = __builtin_complex(0.0, a);
14 b+= __builtin_complex(0.0, c);
15 return __builtin_cabs(b);
18 /* Check that cabs is expanded into ABS for both f and f1 during complex lowering. */
19 /* { dg-final { scan-tree-dump-not "__builtin_cabs " "cplxlower1" } } */
20 /* { dg-final { scan-tree-dump-not "__builtin_sqrt " "cplxlower1" } } */
21 /* { dg-final { scan-tree-dump-times "ABS_EXPR <" 2 "cplxlower1" } } */