This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Tests for PR c++/23180
- From: Josh Conner <jconner at apple dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 09 Sep 2005 18:41:02 -0700
- Subject: Tests for PR c++/23180
OK for mainline?
- Josh
2005-09-09 Josh Conner <jconner@apple.com>
PR c++/23180
* g++.dg/init/struct2.C: New test.
* g++.dg/init/struct3.C: New test.
struct Track {
char soundName[15];
};
struct SaveLoadEntry {
int offs;
int type;
int size;
};
int foobar = ((long) (& ((Track *) 42)->soundName[0])) - 42;
void saveLoadEntries(const void *);
void saveOrLoad() {
struct Track {
char soundName[15];
};
struct SaveLoadEntry {
int offs;
int type;
int size;
};
SaveLoadEntry trackEntries = {
((long) (&((Track *) 42)->soundName[0])) - 42,
0, 1
};
saveLoadEntries(&trackEntries);
}