aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/linear/compound-literal01.c
blob: e45fade37014dc79fcf0df6986ffc026e7824807 (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 foo(void)
{
        struct bfs bf = { .a = 1, .b = 2 };
        return (struct bfs[]){bf}[0].b;
}

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