| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fipa-sra -fdump-ipa-sra-details" } */ |
| 3 |
|
| 4 |
struct bovid |
| 5 |
{ |
| 6 |
float red; |
| 7 |
int green; |
| 8 |
void *blue; |
| 9 |
}; |
| 10 |
|
| 11 |
extern int printf (const char *, ...); |
| 12 |
extern void abort (void); |
| 13 |
|
| 14 |
static int |
| 15 |
__attribute__((noipa)) |
| 16 |
ox (struct bovid cow) |
| 17 |
{ |
| 18 |
if (cow.green != 6) |
| 19 |
abort (); |
| 20 |
|
| 21 |
printf ("green: %f\nblue: %p\nblue again: %p\n", cow.green, |
| 22 |
cow.blue, cow.blue); |
| 23 |
return 0; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
main (int argc, char *argv[]) |
| 28 |
{ |
| 29 |
struct bovid cow; |
| 30 |
|
| 31 |
cow.red = 7.4; |
| 32 |
cow.green = 6; |
| 33 |
cow.blue = &cow; |
| 34 |
|
| 35 |
ox (cow); |
| 36 |
return 0; |
| 37 |
} |
| 38 |
|
| 39 |
/* { dg-final { scan-ipa-dump-not "Will split parameter" "sra" } } */ |