| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O1 -fno-tree-fre -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
/* Test for SRA. */ |
| 5 |
|
| 6 |
void link_error (void); |
| 7 |
|
| 8 |
typedef struct teststruct |
| 9 |
{ |
| 10 |
double d; |
| 11 |
char f1; |
| 12 |
} teststruct; |
| 13 |
|
| 14 |
|
| 15 |
void |
| 16 |
copystruct11 (teststruct *param) |
| 17 |
{ |
| 18 |
static teststruct local; |
| 19 |
param->f1 = 0; |
| 20 |
local = *param; |
| 21 |
if (local.f1 != 0) |
| 22 |
link_error (); |
| 23 |
} |
| 24 |
|
| 25 |
|
| 26 |
/* There should be no reference to link_error. */ |
| 27 |
/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail *-*-* } } } */ |