aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/pr51767.c
blob: 62a192d660d8c13ce4c25ad34496983fa8c90185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR rtl-optimization/51767 */

extern void fn1 (void), fn2 (void);

static inline __attribute__((always_inline)) int
foo (int *x, long y)
{
  asm goto ("" : : "r" (x), "r" (y) : "memory" : lab);
  return 0;
lab:
  return 1;
}

void
bar (int *x)
{
  if (foo (x, 23))
    fn1 ();
  else
    fn2 ();

  foo (x, 2);
}