This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: Bugs/non-portable assumptions in libstdc++


On Fri, 19 Nov 2004 11:51:59 -0600 (CST), Chris Lattner <sabre@nondot.org> wrote:

> From my understanding of the standard, I don't think that this is a legal
> optimization to make.  You are assuming that unconstructed memory starts
> out zero initialized, which is not always the case.

It is the case for objects with static storage duration.

> If you're curious, this is breaking with llvmg++, because the optimizer
> keeps track of uninitialized memory and optimizes based off of that
> information.  In this case, it's seeing loads from uninitialized data, and
> just deletes them.

This is an invalid optimization for such objects.

Jason


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