This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/12218] [3.4 regression] runtime segfault when initializing global variable with pointer-to-member


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]