view gcc/testsuite/gcc.dg/pr44214-2.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */
/* { dg-options "-O2 -freciprocal-math -fdump-tree-original" } */

void do_div (_Complex double *a, _Complex double *b)
{
  *a = *b / (4.0 - 5.0fi);
}

/* Constant folding should multiply *b by the reciprocal of 4 - 5i
   = 4/41 + (5/41)i.  */

/* { dg-final { scan-tree-dump-times " \\\* " 1 "original" } } */
/* { dg-final { scan-tree-dump-times " / " 0 "original" } } */