blob: d24225a3ea764c53463086cf707bb07283f1b483 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
/* PR middle-end/52419 */
/* { dg-do run } */
extern void abort (void);
typedef long long V
__attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
typedef struct S { V b; } P __attribute__((aligned (1)));
struct __attribute__((packed)) T { char c; P s; };
__attribute__((noinline, noclone)) void
foo (P *p)
{
p->b[1] = 5;
}
int
main ()
{
V a = { 3, 4 };
struct T t;
t.s.b = a;
foo (&t.s);
if (t.s.b[0] != 3 || t.s.b[1] != 5)
abort ();
return 0;
}
|