public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement
@ 2015-03-21 15:24 olegendo at gcc dot gnu.org
2015-03-21 15:59 ` [Bug target/65505] " olegendo at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-21 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
Bug ID: 65505
Summary: [5 Regression][SH] ICE in sh_disp_addr_displacement
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
Created attachment 35083
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35083&action=edit
reduced test case
This is a reduced test case from the linux kernel. When compiled with -O2 for
big endian, there's an ICE:
namei1.i:119:1: internal compiler error: in sh_disp_addr_displacement, at
config/sh/sh.c:3805
}
^
0x8a681a8 sh_disp_addr_displacement(rtx_def*)
../../gcc-trunk/gcc/config/sh/sh.c:3805
0x8aee202 short_displacement_mem_operand(rtx_def*, machine_mode)
../../gcc-trunk/gcc/config/sh/predicates.md:454
0x8af0ab6 atomic_mem_operand_0(rtx_def*, machine_mode)
../../gcc-trunk/gcc/config/sh/sync.md:219
0x8b25a17 recog_22
../../gcc-trunk/gcc/config/sh/sh.md:12105
0x8b25a17 recog_23
../../gcc-trunk/gcc/config/sh/sh.md:16801
0x8b2b40a recog_28
../../gcc-trunk/gcc/config/sh/sh.md:9613
0x8b746e6 recog_for_combine
../../gcc-trunk/gcc/combine.c:10893
0x8b8159f try_combine
../../gcc-trunk/gcc/combine.c:3505
0x8b871f7 combine_instructions
../../gcc-trunk/gcc/combine.c:1309
0x8b871f7 rest_of_handle_combine
../../gcc-trunk/gcc/combine.c:14207
0x8b871f7 execute
../../gcc-trunk/gcc/combine.c:14250
Please submit a full bug report,
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
@ 2015-03-21 15:59 ` olegendo at gcc dot gnu.org
2015-03-21 16:00 ` olegendo at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-21 15:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
--- Comment #1 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Created attachment 35084
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35084&action=edit
possible patch
The problem here is that sh_disp_addr_displacement gets an address that looks
like:
(plus:SI (subreg:SI (reg:DI ...) ..) (const_int ...)
The predicates displacement_mem_operand and simple_mem_operand use
arith_reg_operand to match the register operand. This also matches sign_extend
and subreg, which is not handled by constraints such as Sdd.
This is a latent problem, although it seems it never triggered on 4.8 and 4.9.
If we allow subregs for the register operand of address expressions, things get
a bit hairy. Additional checks need to be added everywhere to make sure that
the subreg is indeed a register operand and not e.g. subreg (mem ...).
Disallowing subregs in address expressions seems easier in this case.
The attached patch fixes the problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
2015-03-21 15:59 ` [Bug target/65505] " olegendo at gcc dot gnu.org
@ 2015-03-21 16:00 ` olegendo at gcc dot gnu.org
2015-03-21 17:23 ` olegendo at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-21 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |sh*-*-*
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-03-21
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
2015-03-21 15:59 ` [Bug target/65505] " olegendo at gcc dot gnu.org
2015-03-21 16:00 ` olegendo at gcc dot gnu.org
@ 2015-03-21 17:23 ` olegendo at gcc dot gnu.org
2015-03-23 0:35 ` kkojima at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-21 17:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kkojima at gcc dot gnu.org
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
I'm now testing the patch in attachment 35084 on sh-elf.
Kaz, could you please also pre-test it on sh4-linux?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
` (2 preceding siblings ...)
2015-03-21 17:23 ` olegendo at gcc dot gnu.org
@ 2015-03-23 0:35 ` kkojima at gcc dot gnu.org
2015-03-23 9:56 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kkojima at gcc dot gnu.org @ 2015-03-23 0:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #2)
> I'm now testing the patch in attachment 35084 [details] on sh-elf.
> Kaz, could you please also pre-test it on sh4-linux?
No new failures on sh4-unknown-linux-gnu.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
` (3 preceding siblings ...)
2015-03-23 0:35 ` kkojima at gcc dot gnu.org
@ 2015-03-23 9:56 ` rguenth at gcc dot gnu.org
2015-03-23 19:52 ` olegendo at gcc dot gnu.org
2015-03-23 20:04 ` olegendo at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-23 9:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
` (4 preceding siblings ...)
2015-03-23 9:56 ` rguenth at gcc dot gnu.org
@ 2015-03-23 19:52 ` olegendo at gcc dot gnu.org
2015-03-23 20:04 ` olegendo at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-23 19:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Author: olegendo
Date: Mon Mar 23 18:57:58 2015
New Revision: 221604
URL: https://gcc.gnu.org/viewcvs?rev=221604&root=gcc&view=rev
Log:
gcc/
PR target/65505
* config/sh/predicates.md (simple_mem_operand,
displacement_mem_operand): Add test for reg.
(short_displacement_mem_operand): Test for displacement_mem_operand
before invoking sh_disp_addr_displacement.
* config/sh/constraints.md (Sdd, Sra): Simplify.
* config/sh/sync.md (atomic_mem_operand_0, atomic_mem_operand_1):
Remove redundant displacement_mem_operand tests.
gcc/testsuite/
PR target/65505
* gcc.target/sh/torture/pr65505.c: New.
Added:
trunk/gcc/testsuite/gcc.target/sh/torture/pr65505.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/constraints.md
trunk/gcc/config/sh/predicates.md
trunk/gcc/config/sh/sync.md
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/65505] [5 Regression][SH] ICE in sh_disp_addr_displacement
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
` (5 preceding siblings ...)
2015-03-23 19:52 ` olegendo at gcc dot gnu.org
@ 2015-03-23 20:04 ` olegendo at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: olegendo at gcc dot gnu.org @ 2015-03-23 20:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65505
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Fixed for GCC 5.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2015-03-23 19:04 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-21 15:24 [Bug target/65505] New: [5 Regression][SH] ICE in sh_disp_addr_displacement olegendo at gcc dot gnu.org
2015-03-21 15:59 ` [Bug target/65505] " olegendo at gcc dot gnu.org
2015-03-21 16:00 ` olegendo at gcc dot gnu.org
2015-03-21 17:23 ` olegendo at gcc dot gnu.org
2015-03-23 0:35 ` kkojima at gcc dot gnu.org
2015-03-23 9:56 ` rguenth at gcc dot gnu.org
2015-03-23 19:52 ` olegendo at gcc dot gnu.org
2015-03-23 20:04 ` olegendo at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).