aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr97073.c
blob: 1955e6b8bd258960da03a75522e185b37985318c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* PR middle-end/97073 */
/* { dg-additional-options "-mno-stv" { target i?86-*-* x86_64-*-* } } */

typedef unsigned long long L;
union U { L i; struct T { unsigned k; L l; } j; } u;

__attribute__((noinline,noclone)) void
foo (L x)
{
  u.j.l = u.i & x;
}

int
main ()
{
  u.i = 5;
  foo (-1ULL);
  if (u.j.l != 5)
    __builtin_abort ();
  return 0;
}