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++/50986] weak static data members with constant initializers emitted in .rodata, leading to segfault on startup


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50986

--- Comment #3 from Rafael Avila de Espindola <rafael.espindola at gmail dot com> ---
In clang this was fixed by putting a .init_array section in the same comdat as
the variable it is initializing. That way if the variable is dropped, so is the
initialization code.


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