------- Comment #2 from epperly2 at llnl dot gov 2007-06-01 20:53 ------- To avoid depending on system #include files, the example has typedef unsigned int size_t; hardwired in the code. This may be an incorrect definition for some platforms.
Oddly enough, if I delete NextClass and make TestClass inherit directly from BaseClass, the program no longer segfaults. I am not sure if all the features of this example are strictly necessary. I basically created a new program from scratch that has the same characteristics as the original 100+K program, and I added things until it reproduced the same behavior. -- epperly2 at llnl dot gov changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|-fstrict-aliasing |-fstrict-aliasing |optimizations cause |optimizations cause |constructor not to run in |constructor not to run for |causing segfault |object causing segfault http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32182