From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29882 invoked by alias); 10 Mar 2011 09:34:13 -0000 Received: (qmail 29756 invoked by uid 22791); 10 Mar 2011 09:34:12 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 10 Mar 2011 09:34:08 +0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/48031] [4.4/4.5 Regression] gcc.c-torture/compile/pr42956.c ICEs gcc on m68k-linux, ivopts related? X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.4.6 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 10 Mar 2011 09:34:00 -0000 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: 2011-03/txt/msg00971.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48031 --- Comment #6 from rguenther at suse dot de 2011-03-10 09:33:49 UTC --- On Thu, 10 Mar 2011, mikpe at it dot uu.se wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48031 > > --- Comment #5 from Mikael Pettersson 2011-03-10 09:22:04 UTC --- > If I revert this part of r139061 then things work again: > > * gimplify.c (gimplify_conversion): Use maybe_fold_offset_to_address. > > --- gcc/gimplify.c (revision 139060) > +++ gcc/gimplify.c (revision 139061) > @@ -1842,17 +1842,13 @@ gimplify_conversion (tree *expr_p) > /* Attempt to avoid NOP_EXPR by producing reference to a subtype. > For example this fold (subclass *)&A into &A->subclass avoiding > a need for statement. */ > - if (TREE_CODE (*expr_p) == NOP_EXPR > + if (CONVERT_EXPR_P (*expr_p) > && POINTER_TYPE_P (TREE_TYPE (*expr_p)) > && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (*expr_p, 0))) > - && (tem = maybe_fold_offset_to_reference > + && (tem = maybe_fold_offset_to_address > (TREE_OPERAND (*expr_p, 0), > - integer_zero_node, TREE_TYPE (TREE_TYPE (*expr_p))))) > - { > - tree ptr_type = build_pointer_type (TREE_TYPE (tem)); > - if (useless_type_conversion_p (TREE_TYPE (*expr_p), ptr_type)) > - *expr_p = build_fold_addr_expr_with_type (tem, ptr_type); > - } > + integer_zero_node, TREE_TYPE (*expr_p))) != NULL_TREE) > + *expr_p = tem; > > /* If we still have a conversion at the toplevel, > then canonicalize some constructs. */ > > The first condition change is Ok, it's the change to call m_f_o_t_address > instead of m_f_o_t_reference and the then-clause change that matter. > > Reverting this from trunk @ r139061 + r151559 backport, or trunk @ r151559, > eliminates the ICE. I think this is all just the right circumstances for triggering the bug.