blob: aac21e614022d4356ed1c99bfc70f4a56cbd774f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
struct bfu {
unsigned int a:11;
unsigned int f:9;
unsigned int z:3;
};
struct bfu bfu_init_00_11(int a)
{
struct bfu bfu = { .a = a, };
return bfu;
}
struct bfu bfu_init_20_23(int a)
{
struct bfu bfu = { .z = a, };
return bfu;
}
/*
* check-name: bitfield initializer mask
* check-command: test-linearize -fdump-ir=linearize -Wno-decl $file
* check-output-ignore
*
* check-output-contains: and\\..*fffff800\$
* check-output-contains: shl\\..* \\$20
* check-output-contains: and\\..*ff8fffff\$
*/
|