Debian Codegraph @

gcc/testsuite/g++.dg/init/array11.C

raw
1 // { dg-require-effective-target size32plus }
2 /* PR 11665
3 Orgin: [email protected]
4 The problem was in initializer_constant_valid_p,
5 "for a CONSTRUCTOR, only the last element
6 of the CONSTRUCTOR was being checked"
7 (from the email of the patch which fixed this).
8 This used to ICE because GCC thought gdt_table was a
9 constant value when it is not. */
10
11 int x;
12
13 typedef __SIZE_TYPE__ size_t;
14
15 struct gdt
16 {
17 size_t a,b,c,d,e,f;
18 };
19 void f()
20 {
21 struct gdt gdt_table[2]=
22 {
23 {
24 0,
25 ( (((size_t)(&x))<<(24))&(-1<<(8)) ),
26 },
27 };
28 }
29