aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr86034.c
blob: 30912cab0956a2f40ac88b517223d2bb55c67cf4 (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
33
34
/* PR tree-optimization/86034 */
/* Testcase by  Zhendong Su  <su@cs.ucdavis.edu> */

/* { dg-do run } */

typedef int int32_t __attribute__((mode (__SI__)));

struct A
{
  int32_t b;
  int32_t c:24;
  int32_t d:10;
  int32_t e;
} f;

int32_t g; 

void h ()
{
  struct A i = { 0, 0, -1, 0 };
L:
  f = i;
  i.d = 0;
  if (g < 0)
    goto L;
}

int main (void)
{
  h ();
  if (f.e != 0) 
    __builtin_abort ();
  return 0; 
}