aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr116406.c
blob: 6643c49218fee8facb36efb8a2230b4542c01768 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-Os -finstrument-functions-once" } */
/* { dg-additional-options "-mfpmath=387" { target { x86_64-*-* i?86-*-* } } } */

typedef union {
  float f32;
  double f64;
  long i64;
} U;

_Bool
foo (int c, U u)
{
  switch (c)
    {
    case 1:
      return u.f32 - u.f64;
    case 0:
      return u.i64;
    }
}