libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / pr94600-6.c
blobc247afef11ad71a535916970b4fc1f88bccaaeaf
1 /* { dg-do compile } */
2 /* { dg-require-effective-target size32plus } */
3 /* { dg-options "-fdump-rtl-final -O2" } */
5 /* Target-as-parameter version of pr94600-2.c. */
7 typedef struct {
8 unsigned int f0 : 4;
9 unsigned int f1 : 11;
10 unsigned int f2 : 10;
11 unsigned int f3 : 7;
12 } t0 __attribute__((__aligned__(4)));
14 void
15 bar(volatile t0 *b)
17 t0 a00 = { .f0 = 7, .f1 = 99, .f3 = 1, };
18 t0 a01 = { .f0 = 7, .f1 = 251, .f3 = 1, };
19 t0 a02 = { .f0 = 8, .f1 = 127, .f3 = 5, };
20 t0 a03 = { .f0 = 5, .f1 = 1, .f3 = 1, };
21 t0 a04 = { .f0 = 5, .f1 = 1, .f3 = 1, };
22 t0 a05 = { .f0 = 5, .f1 = 1, .f3 = 1, };
24 b[11+0] = a00;
25 b[11+1] = a01;
26 b[11+2] = a02;
27 b[11+3] = a03;
28 b[11+4] = a04;
29 b[11+5] = a05;
32 /* { dg-final { scan-rtl-dump-times {\(mem/v} 6 "final" } } */
33 /* { dg-final { scan-rtl-dump-times {\(set \(mem/v} 6 "final" } } */