| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
|
| 5 |
static int t; |
| 6 |
|
| 7 |
int f (int *a) |
| 8 |
{ |
| 9 |
int t1, t2 = 0; |
| 10 |
asm ("shouldshowupstill %1" : "=r" (t1), "=m"(t2) : : ); |
| 11 |
t = t1; |
| 12 |
return t2; |
| 13 |
} |
| 14 |
|
| 15 |
/* Check to make sure DCE does not remove the inline-asm as it writes to t2. */ |
| 16 |
/* We used to DCE this inline-asm when removing the store to t. */ |
| 17 |
/* { dg-final { scan-assembler "shouldshowupstill" } } */ |
| 18 |
/* { dg-final { scan-tree-dump-times "shouldshowupstill" 1 "optimized" } } */ |