summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-35.c
blob: dfbd7c1bb4812c1f684411436bbb96fdc18a9574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1-details" } */

struct s { _Complex float i; };
void g(struct s *);

float a1 (float dd)
{
  struct s sv;
  sv.i = dd;
  float d = __real__ sv.i;
  g(&sv);
  return d;
}

/* { dg-final { scan-tree-dump "Replaced REALPART_EXPR.*with dd" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */