* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / init / struct2.C
blob85aacc6fa09bdd2d816b3b809a169ee25dc97947
1 /* PR c++/23180.  */
2 /* Initialize a local structure with an expression that attempts to use
3    pointer arithmetic to calculate another structure field offset.  */
5 void saveLoadEntries(const void *);
7 void saveOrLoad() {
8     struct Track {
9         char soundName[15];
10     };
11     struct SaveLoadEntry {
12         int offs;
13         int type;
14         int size;
15     };    
17     SaveLoadEntry trackEntries = {
18         ((long) (__SIZE_TYPE__) (&((Track *) 42)->soundName[0])) - 42,
19         0, 1
20     };
21     saveLoadEntries(&trackEntries);