view gcc/testsuite/gcc.dg/tree-ssa/complex-7.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { 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"} } */