* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / ext / desig2.C
blob229ae527d77fcf5c300f11290a3767fabf56dbb6
1 // Test for C99-style designated array initializer
3 union U
5   long l;
6   const char *p;
7 };
9 __extension__ U u = { .p = "" };
11 __extension__ int i[4] = { [0] = 1, [1] = 2 };
13 // Currently, except for unions, the C++ front end only supports
14 // designators that designate the element that would have been initialized
15 // anyway.  While that's true, make sure that we get a sorry rather than
16 // bad code.
18 struct A
20   int i;
21   int j;
24 __extension__ A a = { .j = 1 }; // { dg-message "non-trivial" }
25 __extension__ int j[2] = { [1] = 1 }; // { dg-message "non-trivial" }