| 1 |
/* Verify pattern initialization for array type with structure element with |
| 2 |
padding. */ |
| 3 |
/* { dg-do compile } */ |
| 4 |
/* { dg-options "-ftrivial-auto-var-init=pattern -fdump-rtl-expand" } */ |
| 5 |
|
| 6 |
struct test_trailing_hole { |
| 7 |
int one; |
| 8 |
int two; |
| 9 |
int three; |
| 10 |
char four; |
| 11 |
/* "sizeof(unsigned long) - 1" byte padding hole here. */ |
| 12 |
}; |
| 13 |
|
| 14 |
|
| 15 |
int foo () |
| 16 |
{ |
| 17 |
struct test_trailing_hole var[10]; |
| 18 |
return var[2].four; |
| 19 |
} |
| 20 |
|
| 21 |
/* { dg-final { scan-rtl-dump-times "0xfffffffffffffffe\\\]\\\) repeated x16" 1 "expand" } } */ |
| 22 |
|