Debian Codegraph @

gcc/testsuite/gcc.target/arm/thumb-bitfld1.c

raw
1 /* { dg-do compile } */
2 /* { dg-require-effective-target arm_thumb1_ok } */
3 /* { dg-options "-O1 -mthumb -std=c17" } */
4
5 struct foo
6 {
7 unsigned b31 : 1;
8 unsigned b30 : 1;
9 unsigned b29 : 1;
10 unsigned b28 : 1;
11 unsigned rest : 28;
12 };
13
14 unsigned
15 foo(a)
16 struct foo a;
17 {
18 return a.b30;
19 }
20
21 /* { dg-final { scan-assembler-times "lsl" 1 } } */
22 /* { dg-final { scan-assembler-times "lsr" 1 } } */