Commit 84bb243d by Josh Conner Committed by Josh Conner

re PR c++/23180 (Segfault on const initializer with bogus pointer arithmetics)

        PR c++/23180
        * g++.dg/init/pr23180-1.C: New test.
        * g++.dg/init/pr23180-2.C: New test.

From-SVN: r104070
parent d047a201
2005-09-08 Josh Conner <jconner@apple.com>
PR c++/23180
* g++.dg/init/pr23180-1.C: New test.
* g++.dg/init/pr23180-2.C: New test.
2005-09-09 Paul Thomas <pault@gcc.gnu.org>
PR fortran/18878
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);
}
struct Track {
char soundName[15];
};
struct SaveLoadEntry {
int offs;
int type;
int size;
};
int foobar = ((long) (& ((Track *) 42)->soundName[0])) - 42;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment