summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr44214-2.c
blob: f03fa7a0db3b8705d8d99091b2473180b52947a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { 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" } } */