This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/14532] s390x internal compiler error: output_operand: Cannot decompose address.
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2004 12:53:46 -0000
- Subject: [Bug target/14532] s390x internal compiler error: output_operand: Cannot decompose address.
- References: <20040311125714.14532.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2004-03-12 12:53 -------
This looks like generic reload bug to me.
find_reloads_subreg_address is called on (subreg:SI (reg:DI 52) 4) where
reg_equiv_mem[regno] is
(mem/u:DI (plus:DI (reg:DI 12 %r12)
(const:DI (unspec:DI [
(symbol_ref:DI ("b") [flags 0x40] <var_decl 0x2a97d11680 b>)
] 111))) [0 S8 A8])
This calls find_reloads_address on
(plus:DI (reg:DI 12 %r12)
(const:DI (plus:DI (unspec:DI [
(symbol_ref:DI ("b") [flags 0x40] <var_decl 0x2a97d11680 b>)
] 111)
(const_int 4 [0x4]))))
which is not valid on s390 (that MEM without the offset is not offsetable even,
but find_reloads_subreg_address tried anyway).
This later calls find_reloads_address_1 on that
(plus:DI (reg:DI 12 %r12)
(const:DI (plus:DI (unspec:DI [
(symbol_ref:DI ("b") [flags 0x40] <var_decl 0x2a97d11680 b>)
] 111)
(const_int 4 [0x4]))))
which sees the second PLUS operand is a CONST and find_reloads_address_1's just
the first PLUS operand and not the second.
5321 else if (code1 == CONST_INT || code1 == CONST
5322 || code1 == SYMBOL_REF || code1 == LABEL_REF)
5323 find_reloads_address_1 (mode, orig_op0, 0, &XEXP (x, 0), opnum,
5324 type, ind_levels, insn);
That doesn't change anything (of course, REG %r12 is valid, the CONST is not)
and keeps this invalid MEM in the insn stream.
I wonder if find_reloads_address_1 shouldn't be called also on the CONSTs.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rth at redhat dot com,
| |bernds at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14532