aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/pr90075.c
blob: cae7e618fc0cc34646e3e68a419b8de0631e6bda (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-additional-options "-O1" } */

typedef struct {
  float one, two;
} twofloats;

float
bug (twofloats tf)
{
  float f1, f2;
  union {
    twofloats tfloats;
    float arr[2];
  } utfloats;

  utfloats.tfloats = tf;
  f1 = utfloats.arr[1];
  f2 = __builtin_copysignf (0, f1);
  return f2;
}