From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17728 invoked by alias); 21 Jun 2007 18:21:21 -0000 Received: (qmail 16543 invoked by alias); 21 Jun 2007 18:21:05 -0000 Date: Thu, 21 Jun 2007 18:21:00 -0000 Message-ID: <20070621182105.16542.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/20623] ICE: fold check: original tree changed by fold with --enable-checking=fold In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "spop at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01955.txt.bz2 ------- 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. Sebastian ------- Comment #27 from spop at gcc dot gnu dot org 2007-06-21 18:21 ------- Created an attachment (id=13760) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13760&action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20623