aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr34808.c
blob: 63be3f6287a2db08389a2db1409c4d984a69b40a (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
/* PR 34808 */
/* { dg-do compile }
/* { dg-options "-fno-tree-dominator-opts" } */

extern int flags;

struct r { int code; int val;};

void bar (void);
void baz (void);

int
foo (struct r *home)
{
  int n = 0;
  int regno = -1;

  if (home->code == 0)
    regno = home->val;

  if (home->code == 1)
      bar ();
  else if (regno >= 0)
    n = (regno == 16
	 ? 16
	 : (regno - (unsigned long long) (flags != 0 ? 63 : 15)
	    ? regno - 128
	    : -1));

  baz ();
  return n;
}