aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr107385.c
blob: 690ad3c1b5e524b4bc7a12f23a6c8add86da2b96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR middle-end/107385 */
/* { dg-do run { target asm_goto_with_outputs } } */
/* { dg-options "-O2" } */

__attribute__((noipa)) int
foo (void)
{
  int x;
  asm goto ("": "=r" (x) : "0" (15) :: lab);
  x = 6;
lab:
  return x;
}

int
main ()
{
  if (foo () != 6)
    __builtin_abort ();
}