Fortran: fix dependency checks for inquiry refs [PR115039]
[official-gcc.git] / gcc / testsuite / gcc.target / nios2 / pr92499-1.c
blob3985917a10c44993fc0d82683151febe09009444
1 /* PR target/92499 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -mgpopt=global -G8" } */
5 /* Check placement and addressing of flexibly-sized objects with internal
6 linkage. */
8 enum { size = 100 };
10 struct flexible
12 int length;
13 int data[];
16 static struct flexible local_flexible =
18 .data = { [size - 1] = 0, }
21 static struct flexible local_flexible_nonzero =
23 .length = size,
24 .data = { [size - 1] = 0, }
27 struct flexible *
28 get_local_flexible (void)
30 return &local_flexible;
33 struct 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.*\)" } } */