Debian Codegraph @

gcc/testsuite/gcc.target/arm/pr65067.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_cpu_cortex_m3_ok } */
3 /* { dg-options "-O2" } */
4 /* { dg-add-options arm_cpu_cortex_m3 } */
5
6 struct tmp {
7 unsigned int dummy;
8 union {
9 struct {
10 unsigned int xyz : 1;
11 unsigned int mode: 3;
12 unsigned int res : 28;
13 } bf;
14 unsigned int wordval;
15 } reg;
16 };
17
18 void set_mode(int mode)
19 {
20 volatile struct tmp *t = (struct tmp *) 0x1000;
21 t->reg.bf.mode = mode;
22 }
23
24 /* { dg-final { scan-assembler "bfi" } } */