PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48335-6.c
blob769130cc4e389ee3b284e5e2f8c5e5557fbc9829
1 /* PR middle-end/48335 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fno-tree-sra" } */
5 typedef long long T __attribute__((may_alias, aligned (1)));
6 typedef short U __attribute__((may_alias, aligned (1)));
8 struct S
10 _Complex float d __attribute__((aligned (8)));
14 f1 (struct S x)
16 struct S s = x;
17 return *(T *) ((char *) &s.d + 1);
20 int
21 f2 (struct S x)
23 struct S s = x;
24 return ((U *)((char *) &s.d + 1))[0];
27 int
28 f3 (struct S x)
30 struct S s = x;
31 return ((U *)((char *) &s.d + 1))[1];
34 int
35 f4 (struct S x)
37 struct S s = x;
38 return ((U *)((char *) &s.d + 1))[2];
41 int
42 f5 (struct S x)
44 struct S s = x;
45 return ((U *)((char *) &s.d + 1))[3];