Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr57748-1.c
blobdc0fcdc3b857c854fb8a52b8ddb24e869e7396a0
1 /* PR middle-end/57748 */
2 /* { dg-do run } */
3 /* ICE in expand_assignment:
4 misalignp == true, !MEM_P (to_rtx), offset != 0,
5 => gcc_assert (TREE_CODE (offset) == INTEGER_CST) */
7 #include <stdlib.h>
9 extern void abort (void);
11 typedef long long V
12 __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
14 typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
16 struct __attribute__((packed)) T { char c; P s; };
18 void __attribute__((noinline, noclone))
19 check (struct T *t)
21 if (t->s.b[0][0] != 3 || t->s.b[0][1] != 4)
22 abort ();
25 int __attribute__((noinline, noclone))
26 get_i (void)
28 return 0;
31 void __attribute__((noinline, noclone))
32 foo (P *p)
34 V a = { 3, 4 };
35 int i = get_i ();
36 p->b[i] = a;
39 int
40 main ()
42 struct T *t = (struct T *) calloc (128, 1);
44 foo (&t->s);
45 check (t);
47 free (t);
48 return 0;