From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16007 invoked by alias); 23 Apr 2005 15:09:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15941 invoked by alias); 23 Apr 2005 15:09:07 -0000 Date: Sat, 23 Apr 2005 15:09:00 -0000 Message-ID: <20050423150907.15937.qmail@sourceware.org> From: "dberlin at dberlin dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050423092333.21173.mikpe@csd.uu.se> References: <20050423092333.21173.mikpe@csd.uu.se> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/21173] [4.0/4.1 regression] miscompiled pointer subtraction broke Linux kernel X-Bugzilla-Reason: CC X-SW-Source: 2005-04/txt/msg03259.txt.bz2 List-Id: ------- Additional Comments From dberlin at gcc dot gnu dot org 2005-04-23 15:09 ------- Subject: Re: [4.0/4.1 regression] miscompiled pointer subtraction broke Linux kernel On Sat, 2005-04-23 at 14:59 +0000, jakub at gcc dot gnu dot org wrote: > ------- Additional Comments From jakub at gcc dot gnu dot org 2005-04-23 14:59 ------- > Shouldn't that be then also: > - if (!is_gimple_min_invariant (genop1)) > + if (!is_gimple_min_invariant (folded)) > ? > > yes In fact, the error actually makes no sense (IE you guys are overlooking an important fact). is_gimple_min_invariants are legal operands to unary expressions, regardless of whether they are "complex" or not, or so i was told. So if genop1 is is_gimple_min_invariant, it should be fine there, and you shouldn't need to use folded. If it wasn't, we'd force_gimple_operand it. I'm pretty sure you are just covering up a disconnect in what we allow as gimple and what we handle. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21173