1 /* PR rtl-optimization/38245 */
3 /* { dg-additional-sources "pr38245-4.c" } */
4 /* { dg-options "-O2" } */
8 extern void abort (void);
10 struct A
{ int i
, j
; union { short s
[4]; long long l
; }; char pad
[512]; } a
;
13 void __attribute__((noinline
))
16 a
.s
[2] = b1 (6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
17 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21);
21 void __attribute__((noinline
))
24 a
.s
[2] = b2 (6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
25 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21);
29 void __attribute__((noinline
))
32 struct B b
= { 30, 31, { 32, 33 } };
33 a
.s
[2] = b3 (6, 7, 8, 9, 10, 11, 12, b
, 14, b
, 16, b
, 18, 19, 20, 21,
34 6, b
, 8, b
, 10, 11, 12, 13, 14, b
, 16, b
, 18, 19, 20, 21);
38 void __attribute__((noinline
))
41 struct B b
= { 30, 31, { 32, 33 } };
42 a
.s
[2] = b4 (6, 7, 8, 9, 10, 11, 12, b
, 14, b
, 16, b
, 18, 19, 20, 21,
43 6, b
, 8, b
, 10, 11, 12, 13, 14, b
, 16, b
, 18, 19, 20, 21);
47 void __attribute__((noinline
))
50 a
.s
[2] = b5 (6.0, 7, 8, 9, 10, 11, 21.0, 22.0, 23.0);
54 void __attribute__((noinline
))
57 a
.s
[2] = b6 (6.0, 7, 8, 9, 10, 11, 21.0, 22.0, 23.0);
61 void __attribute__((noinline
))
68 void __attribute__((noinline
))
75 void __attribute__((noinline
))
78 a
.s
[2] = b9 (6, 7, 8, 9, 10, 11, 12);
82 void __attribute__((noinline
))
85 a
.s
[2] = b10 (6, 7, 8, 9, 10, 11, 12);
94 for (i
= 0; i
< (int) sizeof buf
; i
++)
96 asm volatile ("" : : "r" (buf
) : "memory");
107 asm volatile ("" : : "r" (buf
) : "memory");
108 for (i
= 0; i
< (int) sizeof buf
; i
++)
109 if (buf
[i
] != (char) i
)