summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/compat/union-m128-1_y.c
blob: 2b6eb0a6ee88166c375e8705a85e2f1f6af61f64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-options "-O" } */

#ifdef __x86_64__
#include <stdlib.h>

#include "union-m128-1.h"

void
bar (SS_union_mi128 un)
{
  union_mi128 x;
  
  x.x = un.x;
  if (x.u [0] != 0x123456789abcedf0LL
      || x.u [1] != 0xfedcba9876543210LL)
    abort ();
}

void
foo (SS_struct_mi128 st)
{
  union_mi128 x;
  
  x.x = st.x;
  if (x.u [0] != 0x123456789abcedf0LL
      || x.u [1] != 0xfedcba9876543210LL)
    abort ();
}
#else
int dummy_y;
#endif