]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr94600-3.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr94600-3.c
1 /* { dg-do compile } */
2 /* { dg-require-effective-target size32plus } */
3 /* { dg-options "-fdump-rtl-final -O2 -fno-unroll-loops" } */
4 /* { dg-additional-options "-DALIGN_VAR" { target { ! non_strict_align } } } */
5
6 /* Same-address version of pr94600-1.c. */
7
8 typedef struct {
9 unsigned int f0 : 4;
10 unsigned int f1 : 11;
11 unsigned int f2 : 10;
12 unsigned int f3 : 7;
13 } t0;
14
15 static t0 a0[]
16 #ifdef ALIGN_VAR
17 __attribute__((aligned (4)))
18 #endif
19 = {
20 { .f0 = 7, .f1 = 99, .f3 = 1, },
21 { .f0 = 7, .f1 = 251, .f3 = 1, },
22 { .f0 = 8, .f1 = 127, .f3 = 5, },
23 { .f0 = 5, .f1 = 1, .f3 = 1, },
24 { .f0 = 5, .f1 = 1, .f3 = 1, },
25 { .f0 = 5, .f1 = 1, .f3 = 1, },
26 };
27
28 void
29 foo(void)
30 {
31 __SIZE_TYPE__ i;
32 __SIZE_TYPE__ base = 0x000a0000;
33 for (i = 0; i < (sizeof (a0) / sizeof ((a0)[0])); i++) {
34 *(volatile t0 *) (base + 44) = a0[i];
35 }
36 }
37
38 /* The loop isn't unrolled. */
39 /* { dg-final { scan-rtl-dump-times {\(mem/v} 1 "final" } } */
40 /* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 1 "final" } } */