[Bug libstdc++/92522] valid code using deque throws bad_alloc when compiled with -flto
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 15 08:17:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92522
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Isn't this undefined since you require 'test' to be constructed before 'sample'
but the order of global CTORs is undefined between translation units?
IIRC there's a duplicate bugreport with further suggetions as to how to
try to mimic non-LTO behavior here (sort CTORs in "link order").
More information about the Gcc-bugs
mailing list