| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */ |
| 3 |
/* { dg-final { scan-assembler-times "XXX" 2 } } */ |
| 4 |
|
| 5 |
static inline __attribute__((always_inline)) int dec_and_test (int *i) |
| 6 |
{ |
| 7 |
asm volatile goto ("XXX %0, %l[cc_label]" |
| 8 |
: : "m" (*i) : "memory" : cc_label); |
| 9 |
return 0; |
| 10 |
cc_label: |
| 11 |
return 1; |
| 12 |
} |
| 13 |
extern int getit (int *); |
| 14 |
int f (int *i, int cond) |
| 15 |
{ |
| 16 |
if (cond) { |
| 17 |
getit (0); |
| 18 |
if (dec_and_test (i)) |
| 19 |
getit (i); |
| 20 |
return 42; |
| 21 |
} |
| 22 |
if (dec_and_test (i)) |
| 23 |
(void)1; |
| 24 |
return getit (i); |
| 25 |
} |