aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr44214-2.c
blob: 7e8581a2bb38bfe255db18735c3cd0167a075d28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { 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" } } */
/* { dg-final { cleanup-tree-dump "original" } } */