This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jun 2007 19:33:28 -0000
- Subject: [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold
- References: <bug-20623-7559@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #28 from rguenther at suse dot de 2007-06-21 19:33 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 21 Jun 2007, spop at gcc dot gnu dot org wrote:
> ------- Comment #26 from spop at gcc dot gnu dot org 2007-06-21 18:21 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> Just to sum it up, and for asking for advice,
> attached is the patch that I'm bootstrapping and testing now.
>
> > Another thing would be to note where we call this helper from fold() routines
> > and not set the flag only for those callers which should be safe. We'd need
> > another flag argument to the function or another wrapper.
> >
>
> In another version of this patch, I replaced all the callers from the
> folder, to use a gcc_assert (TREE_ADDRESSABLE (base) == 1), and this
> failed because some calls from the C front-end used that function and
> did not have set their addressable flag (yet?). This resulted in all
> the fails left in the second part of the bug.
>
> With the attached patch, fold functions do not set that flag, and this
> solves the remaining fails. I'm bootstrapping and testing all
> languages again with fold checking.
This looks good (again ;)).
Thanks,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623