aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/complex-7.c
blob: 20a2a3785f69ca15b221d09c3aab085c76ba6ac9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop1" } */

float f(_Complex float x, _Complex float y){
  x += y;
  return __builtin_cimagf (x);
}

double g(double x){
  _Complex double c = __builtin_cexpi (x);
  return __builtin_creal (c);
}

/* { dg-final { scan-tree-dump "__builtin_cos" "forwprop1"} } */
/* { dg-final { scan-tree-dump-times "IMAGPART_EXPR" 2 "forwprop1"} } */