This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR middle-end/48440: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Michael Matz <matz at suse dot de>, Richard Guenther <richard dot guenther at gmail dot com>, Paolo Bonzini <bonzini at gnu dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 15 Apr 2011 15:33:20 -0700 (PDT)
- Subject: Re: PATCH: PR middle-end/48440: [4.7 Regression] FAIL: gcc.c-torture/compile/labels-3.c
I was curious if anyone was still looking at this problem? I see this
on IA64 HP-UX in 32 bit mode where ptr_mode(SImode) != Pmode(DImode).
As H.J. points out, expand_expr_real_2 is calling simplify_gen_subreg
(expr.c, line 7366) and at that point op0 is "(label_ref/v:DI 32)" and
innermode is SImode. Because innermode doesn't match the mode of op0,
we abort in simplify_subreg. So it seems we either need to change how
we calculate innermode (so that it is DImode) or change expand_expr so
that it returns a SImode RTX expression for the tree treeop0. I am not
sure which of these is the right thing to do. The tree (treeop0) that
op0 is generated from is below and when we call expr_expr the modifier
is EXPAND_INITIALIZER. Should expand_expr return an SImode expression
for this tree (ptr_mode) or a DImode expression (Pmode) in this case?
<addr_expr 65866560
type <pointer_type 657d8960
type <void_type 657d8900 void VOID
align 8 symtab 0 alias set -1 canonical type 657d8900
pointer_to_this <pointer_type 657d8960>>
sizes-gimplified public unsigned SI
size <integer_cst 657d1920 constant 32>
unit size <integer_cst 657d16c0 constant 4>
align 32 symtab 0 alias set -1 canonical type 657d8960
pointer_to_this <pointer_type 657f1720> reference_to_this <reference_type 657f14e0>>
constant
arg 0 <label_decl 657e21b8 l2 type <void_type 657d8900 void>
side-effects VOID file labels-3.c line 16 col 2
align 1 context <function_decl 65858180 foo> initial <error_mark 657e6040>
(code_label/s 32 0 0 4 4 ("l2") [2 uses])
chain <var_decl 6585e3c0 p type <pointer_type 657d8960>
used unsigned SI file labels-3.c line 12 col 9 size <integer_cst 657d1920 32> unit size <integer_cst 657d16c0 4>
align 32 context <function_decl 65858180 foo>
(mem/f/c/i:SI (reg/f:DI 328 sfp) [0 p+0 S4 A32])>>
labels-3.c:11:44>
Steve Ellcey
sje@cup.hp.com