c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr70740-1.c
blob77e6a2d71876a3557c2a92361239ccae8051dab3
1 /* { dg-do compile } */
3 /* This is an alternative to the original pr70740.c testcase,
4 arrays are now 1 in size where they were 0 in the other testcase. */
6 extern int foo (void);
7 extern void *memcpy (void *, const void *, __SIZE_TYPE__);
9 struct
11 char a[6];
12 } d;
13 struct
15 int a1[1];
16 int a2[1];
17 int a3[1];
18 int a4[1];
19 } a, c;
20 int b;
22 int *
23 bar ()
25 if (b)
26 return a.a4;
27 return a.a2;
30 void
31 baz ()
33 int *e, *f;
34 if (foo ())
35 e = c.a3;
36 else
37 e = c.a1;
38 memcpy (d.a, e, 6);
39 f = bar ();
40 memcpy (d.a, f, 1);