aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/compound-literal02.c
blob: 6ed5809eb83ab7c22f8a3382ea41a1dd79ecaacf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
struct bfs {
        int a: 2;
        int b: 30;
};

int bar(void)
{
        struct bfs bf = { .a = 1, .b = 4 };
        return (struct bfs[]){bf, { .a = 3, .b = 6}}[1].b;
}

/*
 * check-name: compound-literal02.c
 * check-command: test-linearize -Wno-decl $file
 *
 * check-output-ignore
 * check-output-contains: ret\\..*\\$6
 */