This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Bugs/non-portable assumptions in libstdc++
- From: Jason Merrill <jason at redhat dot com>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 22 Nov 2004 17:54:57 -0500
- Subject: Re: Bugs/non-portable assumptions in libstdc++
- References: <Pine.LNX.4.44.0411191140220.30278-100000@nondot.org>
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