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 07:59:51 -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 #20 from rguenther at suse dot de 2007-06-21 07:59 -------
Subject: Re: ICE: fold check: original tree changed
by fold with --enable-checking=fold
On Thu, 20 Jun 2007, spop at gcc dot gnu dot org wrote:
>
>
> ------- Comment #17 from spop at gcc dot gnu dot org 2007-06-20 22:58 -------
> Subject: Re: ICE: fold check: original tree changed by fold with
> --enable-checking=fold
>
> Hi,
>
> The following patch fixes a part of the reported testsuite fails.
> With this patch we avoid folding the TREE_CHAIN of an SSA_NAME, that
> corresponds to its SSA_NAME_DEF_STMT.
>
> Index: gcc/fold-const.c
> ===================================================================
> --- gcc/fold-const.c (revision 125883)
> +++ gcc/fold-const.c (working copy)
> @@ -12775,7 +12775,8 @@ recursive_label:
> fold_checksum_tree (TREE_TYPE (expr), ctx, ht);
> if (TREE_CODE_CLASS (code) != tcc_type
> && TREE_CODE_CLASS (code) != tcc_declaration
> - && code != TREE_LIST)
> + && code != TREE_LIST
> + && code != SSA_NAME)
> fold_checksum_tree (TREE_CHAIN (expr), ctx, ht);
> switch (TREE_CODE_CLASS (code))
> {
>
> The only fails that remain when compiling with default languages and
> --enable-checking=assert,fold,gc,misc,rtl,rtlflag,runtime,tree
> on i686-linux are:
>
> gcc.c-torture/compile/20021108-1.c
> gcc.c-torture/compile/920501-7.c
> gcc.c-torture/compile/labels-1.c
> gcc.c-torture/compile/labels-2.c
> gcc.c-torture/compile/labels-3.c
> gcc.c-torture/execute/comp-goto-1.c
> gcc.dg/20021029-1.c
> gcc.dg/pr16973.c
>
> Okay for trunk?
Yes, this is ok.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623