summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/designated-initializers.c
blob: 617c4287d5603d3ee4734d0ddda0ca391be0f7da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang -triple i386-unknown-unknown %s -emit-llvm -o - | grep "<{ i8\* null, i32 1024 }>"

struct foo {
    void *a;
    int b;
};

union { int i; float f; } u = { };

int main(int argc, char **argv)
{
  union { int i; float f; } u2 = { };
    static struct foo foo = {
        .b = 1024,
    };
}
OpenPOWER on IntegriCloud