From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1429 invoked by alias); 7 Apr 2011 14:05:40 -0000 Received: (qmail 1421 invoked by uid 22791); 7 Apr 2011 14:05:39 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qy0-f182.google.com (HELO mail-qy0-f182.google.com) (209.85.216.182) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Apr 2011 14:05:33 +0000 Received: by qyk27 with SMTP id 27so1903130qyk.20 for ; Thu, 07 Apr 2011 07:05:32 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.63.143 with SMTP id b15mr696588qci.136.1302185132362; Thu, 07 Apr 2011 07:05:32 -0700 (PDT) Received: by 10.229.34.71 with HTTP; Thu, 7 Apr 2011 07:05:32 -0700 (PDT) In-Reply-To: References: Date: Thu, 07 Apr 2011 14:05:00 -0000 Message-ID: Subject: Re: PATCH: PR middle-end/48440: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c From: "H.J. Lu" To: Michael Matz Cc: Richard Guenther , Paolo Bonzini , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg00551.txt.bz2 On Thu, Apr 7, 2011 at 5:34 AM, Michael Matz wrote: > Hi, > > On Thu, 7 Apr 2011, Richard Guenther wrote: > >> > 5600 =A0 =A0 =A0newx =3D simplify_subreg (outermode, op, innermode, by= te); >> > (gdb) f 1 >> > #1 =A00x0000000000708494 in expand_expr_real_2 (ops=3D0x7fffffffb0c0, = target=3D0x0, >> > =A0 =A0tmode=3DVOIDmode, modifier=3DEXPAND_INITIALIZER) >> > =A0 =A0at /export/gnu/import/git/gcc-x32/gcc/expr.c:7366 >> > 7366 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0op0 =3D simplify_gen_subreg (mode,= op0, inner_mode, >> > (gdb) call debug_tree (treeop0) >> > =A0> > =A0 =A0type > > =A0 =A0 =A0 =A0type > > =A0 =A0 =A0 =A0 =A0 =A0align 8 symtab 0 alias set -1 canonical type 0x= 7ffff0b83e70 >> > =A0 =A0 =A0 =A0 =A0 =A0pointer_to_this > >> > =A0 =A0 =A0 =A0sizes-gimplified public unsigned SI >> > =A0 =A0arg 0 >> > (gdb) call debug_rtx (op0) >> > (label_ref/v:DI 22) >> > (gdb) >> > >> >> First I wonder what CONSTANT_P object we arrive with here (it looks like >> something unfolded, given that we likely came here with a NOP_EXPR). > > The CONSTANT_P object is the '(label_ref/v:DI 22)'. =A0Not only CONST_INT > are CONSTANT_P, also some others (symbol_ref too). =A0Those might have a > mode. =A0Here the label_ref has DImode, but the pointer type in trees poi= nts > to an SImode. =A0The latter makes sense, because that's what ptr_mode is = for > HJs target. > > HJ: you'll need to tell us what you mean with 'breaks > gcc.c-torture/compile/labels-3.c' . =A0What breaks, in which way? > I got #0 fancy_abort ( file=3D0x12470e0 "/export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c", line=3D5266, function=3D0x1248470 "simplify_subreg") at /export/gnu/import/git/gcc-x32/gcc/diagnostic.c:893 #1 0x00000000009d0ab5 in simplify_subreg (outermode=3DHImode, op=3D0x7ffff= 0c55dd0, innermode=3DSImode, byte=3D0) at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:5265 #2 0x00000000009d1e83 in simplify_gen_subreg (outermode=3DHImode, op=3D0x7ffff0c55dd0, innermode=3DSImode, byte=3D0) at /export/gnu/import/git/gcc-x32/gcc/simplify-rtx.c:5600 #3 0x0000000000708736 in expand_expr_real_2 (ops=3D0x7fffffffb480, target= =3D0x0, tmode=3DVOIDmode, modifier=3DEXPAND_INITIALIZER) at /export/gnu/import/git/gcc-x32/gcc/expr.c:7366 #4 0x00000000007153e1 in expand_expr_real_1 (exp=3D0x7ffff0a87f30, target= =3D0x0, tmode=3DVOIDmode, modifier=3DEXPAND_INITIALIZER, alt_rtl=3D0x0) at /export/gnu/import/git/gcc-x32/gcc/expr.c:9728 .. (gdb) f 3 #3 0x0000000000708736 in expand_expr_real_2 (ops=3D0x7fffffffb480, target= =3D0x0, tmode=3DVOIDmode, modifier=3DEXPAND_INITIALIZER) at /export/gnu/import/git/gcc-x32/gcc/expr.c:7366 7366 op0 =3D simplify_gen_subreg (mode, op0, inner_mode, (gdb) call debug_rtx (op0) (label_ref/v:DI 22) (gdb) p inner_mode $2 =3D SImode (gdb) We are calling simplify_gen_subreg with wrong inner_mode. --=20 H.J.