summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr71055.c
blob: 7fe5a71ce0646667055ce7f5ccde64b35a902165 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do run } */

extern void abort (void);
union U { int i; _Bool b; char c; };
void __attribute__((noinline,noclone))
foo (union U *u)
{
  if (u->c != 0)
    abort ();
}
int main()
{
  union U u;
  u.i = 10;
  u.b = 0;
  foo (&u);
  return 0;
}