This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2003 23:14:42 -0000
- Subject: [Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member
- References: <20030908222714.12218.bryner@brianryner.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-09-08 23:14:41
date| |
Summary|code generated for |[3.4 regression] runtime
|initializing global variable|segfault when initializing
|with pointer-to-member |global variable with
|crashes |pointer-to-member
Target Milestone|--- |3.4
------- Additional Comments From bangerth at dealii dot org 2003-09-08 23:14 -------
Indeed, a regression on mainline. Slightly massaged and put
into the style in which we usually have it, this looks like so:
------------------------
struct C {
int i;
typedef int C::*mPtr;
static const mPtr side;
};
const C::mPtr C::side = &C::i;
int main() {}
------------------------
The code segfaults in run time.
W.