[Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member
dbaron at dbaron dot org
gcc-bugzilla@gcc.gnu.org
Mon Sep 8 23:49:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12218
------- Additional Comments From dbaron at dbaron dot org 2003-09-08 23:49 -------
So it's clear what the regression is:
gcc 3.3 puts the variables in .rodata with the correct value and emits no
initialization code
gcc trunk puts the variables in .rodata with the value -1 and emits
initialization code (with the correct value) which segfaults
That's based on the testcase:
struct C { int i, j; };
typedef int C::*mPtr;
extern const mPtr should_be_0 = &C::i;
extern const mPtr should_be_4 = &C::j;
More information about the Gcc-bugs
mailing list