This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug pch/13689] GGC PCH breaks aliasing
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2004 02:17:01 -0000
- Subject: [Bug pch/13689] GGC PCH breaks aliasing
- References: <20040114231753.13689.dje@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at dberlin dot org 2004-01-15 02:16 -------
Subject: Re: GGC PCH breaks aliasing
On Jan 14, 2004, at 9:09 PM, pinskia at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org
> 2004-01-15 02:09 -------
> no it is not as it still causes wrong-code in certain cases.
>
As stated, doing that would just hide the bug, not fix it.
The bug is actually caused by PCH, *not* Jan's changes.
We will still create alias sets the same way, we are just storing them
different, so that the queries just don't trip anything in GCC (because
of lack of asserts that alias set values we expect to be in the splay
tree are in the splay tree) that lets you know there is a bug.
It's still there, and still potential for wrong code exists.
Reverting Jan's change is the absolute *wrong* thing to do. It removes
a speedup, AND papers over the bug, instead of actually fixing the
problem.
and it doesn't fix *anything*.
The bug is PCH not storing the actual alias sets, when the types it
*does* store are using them.
So that we end up with trees referencing alias set 7 or 9 that when the
PCH is reloaded, do not exist.
With splay trees, we would look these up, see nothing, and assume
everything was fine anyway, when it wasn't.
Since Jan uses varrays, when we try to access the out-of-bounds
element, we get a check error.
In short, this is not a regression caused by Jan's patch, it's a latent
bug caused by PCH that Jan's patch simply uncovered.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13689