[Bug middle-end/45722] [4.6 Regression] FAIL: gcc.c-torture/execute/20040709-2.c execution at -O1 and -Os

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 12 11:41:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45722

--- Comment #28 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2010-11-12 11:20:12 UTC ---
AFAICS Dave's analysis still holds.  The problematic insn is

(insn 88 87 89 5 (set (reg:DI 134 [ x$l ])
        (mem/c:DI (reg/f:SI 185) [0 MEM[(struct E *)&sE]+0 S8 A8]))
pr45722.c:50 -1
     (nil))

(gdb) frame 1
#1  0x00000000007678ff in expand_assignment (to=0x7ffff7fbfcb8,
    from=0x7ffff7107000, nontemporal=0 '\000')
    at /home/eric/svn/gcc/gcc/expr.c:4474
4474      result = store_expr (from, to_rtx, 0, nontemporal);
(gdb) p debug_generic_expr(from)
MEM[(struct E *)&sE]
$9 = void
(gdb) p debug_generic_expr(to)
x$l_3

The we arrive in the MEM expander:

    align = MAX (TYPE_ALIGN (TREE_TYPE (exp)),
             get_object_alignment (exp, BIGGEST_ALIGNMENT));
    op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_SUM);
    op0 = convert_memory_address_addr_space (address_mode, op0, as);
    if (!integer_zerop (TREE_OPERAND (exp, 1)))
      {
        rtx off
          = immed_double_int_const (mem_ref_offset (exp), address_mode);
        op0 = simplify_gen_binary (PLUS, address_mode, op0, off);
      }
    op0 = memory_address_addr_space (mode, op0, as);
    temp = gen_rtx_MEM (mode, op0);
    set_mem_attributes (temp, exp, 0);
    set_mem_addr_space (temp, as);

(gdb) p align
$21 = 64
(gdb) p debug_rtx(temp)
(mem/c:DI (reg/f:SI 185) [0 MEM[(struct E *)&sE]+0 S8 A8])

so it's exactly the situation described in comment #16.



More information about the Gcc-bugs mailing list