[Bug c++/59895] Updates to global variables not consistent across translation units when FLTO is enabled

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jan 21 01:39:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59895

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The order of initializing s1 and globalvec is undefined in C++ and that is the
effect you are seeing.  If s1 and globalvec are declared in the same TU, the
order is defined by the order in the source itself.



More information about the Gcc-bugs mailing list