c++: prvalue of array type [PR111286]
[official-gcc.git] / gcc / testsuite / c-c++-common / auto-init-13.c
blobaa5883af770f86d6d198d8488d2b90030ffa67e0
1 /* Verify the auto initialization of structure or union with a flexible array
2 member. */
3 /* { dg-do compile } */
4 /* { dg-options "-ftrivial-auto-var-init=pattern -fdump-tree-gimple" } */
6 struct a {
7 int b;
8 int array[];
9 };
10 union tar {
11 struct a bar;
12 char buf;
15 int foo()
17 struct a d;
18 union tar var;
19 return d.b + var.bar.b;
22 /* { dg-final { scan-tree-dump "d = .DEFERRED_INIT \\(4, 1, \&\"d\"" "gimple" } } */
23 /* { dg-final { scan-tree-dump "var = .DEFERRED_INIT \\(4, 1, \&\"var\"" "gimple" } } */