2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mgpopt=global -G8" } */
5 /* Check placement and addressing of flexibly-sized objects with internal
16 static struct flexible local_flexible
=
18 .data
= { [size
- 1] = 0, }
21 static struct flexible local_flexible_nonzero
=
24 .data
= { [size
- 1] = 0, }
28 get_local_flexible (void)
30 return &local_flexible
;
34 get_local_flexible_nonzero (void)
36 return &local_flexible_nonzero
;
39 /* We should not place the flexibly-sized objects in small data
40 sections, or generate gp-relative addresses for them. */
42 /* { dg-final { scan-assembler-not "\\.sdata" } } */
43 /* { dg-final { scan-assembler-not "\\.sbss" } } */
44 /* { dg-final { scan-assembler-not "%gprel\(.*flexible.*\)" } } */