testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253]
[official-gcc.git] / gcc / testsuite / g++.dg / init / struct3.C
blob53804b3d1533ae82a2a2ff1a394cdb58f98c2a8b
1 /* PR c++/23180.  */
2 /* Initialize a global variable with an expression that attempts to use
3    pointer arithmetic to calculate a structure field offset.  */
5 struct Track {
6   char soundName[15];
7 };
9 struct SaveLoadEntry {
10   int offs;
11   int type;
12   int size;
13 };    
15 int foobar = ((long) (__SIZE_TYPE__) (& ((Track *) 42)->soundName[0])) - 42;