summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/torture/pr41680.C
blob: 7faab0d5fbc7c9129cbc94b25ff54fcb0bcd8367 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// PR target/41680
// { dg-do compile }

extern void baz (float);

inline bool
bar (float x)
{
  union { float f; int i; } u;
  u.f = x;
  return (u.i & 1);
}

void
foo (float *x)
{
  for (int i = 0; i < 10; i++)
    {
      float f = x[i];
      if (!bar (f))
	baz (f);
    }
}