* [Bug middle-end/22239] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
@ 2005-06-29 23:39 ` danglin at gcc dot gnu dot org
2005-06-29 23:52 ` danglin at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2005-06-29 23:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danglin at gcc dot gnu dot org 2005-06-29 23:39 -------
Created an attachment (id=9177)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9177&action=view)
Patch to loop.c
Testing patch as possible fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug middle-end/22239] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
2005-06-29 23:39 ` [Bug middle-end/22239] " danglin at gcc dot gnu dot org
@ 2005-06-29 23:52 ` danglin at gcc dot gnu dot org
2005-06-30 1:53 ` [Bug rtl-optimization/22239] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2005-06-29 23:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From danglin at gcc dot gnu dot org 2005-06-29 23:52 -------
Looks like the following change introduced the regression:
2005-04-16 Alexandre Oliva <aoliva@redhat.com>
PR target/20126
* loop.c (loop_givs_rescan): Handle non-replaceable (plus (reg)
(const)).
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
2005-06-29 23:39 ` [Bug middle-end/22239] " danglin at gcc dot gnu dot org
2005-06-29 23:52 ` danglin at gcc dot gnu dot org
@ 2005-06-30 1:53 ` pinskia at gcc dot gnu dot org
2005-06-30 2:26 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-30 1:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-30 01:52 -------
So this is a latent bug on the 4.0 branch too.
I just wish loop.c would go away.
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |rtl-optimization
Keywords| |ice-on-valid-code
Summary|i-cobol.adb:482: error: |[4.0/4.1 Regression] i-
|unrecognizable insn |cobol.adb:482: error:
| |unrecognizable insn
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-06-30 1:53 ` [Bug rtl-optimization/22239] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-06-30 2:26 ` pinskia at gcc dot gnu dot org
2005-07-07 22:53 ` cvs-commit at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-30 2:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.1 |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-06-30 2:26 ` pinskia at gcc dot gnu dot org
@ 2005-07-07 22:53 ` cvs-commit at gcc dot gnu dot org
2005-07-08 23:02 ` rearnsha at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-07 22:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-07 22:53 -------
Subject: Bug 22239
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: danglin@gcc.gnu.org 2005-07-07 22:53:31
Modified files:
gcc : ChangeLog loop.c
Log message:
PR middle-end/22239
* loop.c (loop_givs_rescan): Check that v->new_reg is a REG.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9376&r2=2.9377
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&r1=1.534&r2=1.535
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-07-07 22:53 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-08 23:02 ` rearnsha at gcc dot gnu dot org
2005-07-09 0:25 ` rearnsha at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-07-08 23:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-07-08 23:00 -------
The latest patch causes a bootstrap failure on arm-elf and arm-netbsdelf. I'll
attach a file momentarily.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-07-08 23:02 ` rearnsha at gcc dot gnu dot org
@ 2005-07-09 0:25 ` rearnsha at gcc dot gnu dot org
2005-07-09 1:32 ` dave at hiauly1 dot hia dot nrc dot ca
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2005-07-09 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2005-07-08 23:02 -------
Created an attachment (id=9233)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9233&action=view)
file that now ICEs with latest patch.
Compile the this file with -O2 -g on an arm-elf cross
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-07-09 0:25 ` rearnsha at gcc dot gnu dot org
@ 2005-07-09 1:32 ` dave at hiauly1 dot hia dot nrc dot ca
2005-07-09 7:12 ` dave at hiauly1 dot hia dot nrc dot ca
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2005-07-09 1:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2005-07-09 00:41 -------
Subject: Re: [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
> Compile the this file with -O2 -g on an arm-elf cross
Looks like a target, or possibly a different loop bug to me:
(gdb) p debug_rtx (v->new_reg)
(plus:SI (reg:SI 993)
(const_int -60 [0xffffffc4]))
(gdb) p debug_rtx (v->insn)
(insn 1785 3575 1792 (parallel [
(set (mem/s:SI (reg/f:SI 624) [41 adpm S4 A32])
(reg:SI 0 r0))
(set (mem/s:SI (plus:SI (reg/f:SI 624)
(const_int 4 [0x4])) [41 adpm S4 A32])
(reg:SI 1 r1))
(set (mem/s:SI (plus:SI (reg/f:SI 624)
(const_int 8 [0x8])) [41 adpm S4 A32])
(reg:SI 2 r2))
(set (mem/s:SI (plus:SI (reg/f:SI 624)
(const_int 12 [0xc])) [41 adpm S4 A32])
(reg:SI 3 r3))
]) -1 (nil)
(nil))
(gdb) p debug_rtx (*v->location)
(plus:SI (reg/f:SI 624)
(const_int 12 [0xc]))
So, it's apparently not valid to substitute a reg into the fourth instruction
of the above parallel on arm-elf.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-07-09 1:32 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2005-07-09 7:12 ` dave at hiauly1 dot hia dot nrc dot ca
2005-07-09 17:13 ` aoliva at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2005-07-09 7:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca 2005-07-09 02:44 -------
Subject: Re: [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
> --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9233&action=view)
> file that now ICEs with latest patch.
>
> Compile the this file with -O2 -g on an arm-elf cross
This is totally untested but possibly something like the change below
would resolve the problem for both ports.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.535
diff -u -3 -p -r1.535 loop.c
--- loop.c 7 Jul 2005 22:53:28 -0000 1.535
+++ loop.c 9 Jul 2005 02:34:18 -0000
@@ -5496,14 +5496,21 @@ loop_givs_rescan (struct loop *loop, str
v->new_reg));
else if (GET_CODE (*v->location) == PLUS
&& REG_P (XEXP (*v->location, 0))
- && REG_P (v->new_reg)
&& CONSTANT_P (XEXP (*v->location, 1)))
- loop_insn_emit_before (loop, 0, v->insn,
- gen_move_insn (XEXP (*v->location, 0),
- gen_rtx_MINUS
- (GET_MODE (*v->location),
- v->new_reg,
- XEXP (*v->location, 1))));
+ {
+ rtx reg, seq;
+ start_sequence ();
+ if (REG_P (v->new_reg))
+ reg = v->new_reg;
+ else
+ reg = force_reg (GET_MODE (*v->location), v->new_reg);
+ emit_move_insn (XEXP (*v->location, 0),
+ gen_rtx_MINUS (GET_MODE (*v->location), reg,
+ XEXP (*v->location, 1)));
+ seq = get_insns ();
+ end_sequence ();
+ loop_insn_emit_before (loop, 0, v->insn, seq);
+ }
else
{
/* If it wasn't a reg, create a pseudo and use that. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-07-09 7:12 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2005-07-09 17:13 ` aoliva at gcc dot gnu dot org
2005-07-09 23:31 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2005-07-09 17:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From aoliva at gcc dot gnu dot org 2005-07-09 17:08 -------
Please see bug 20126, it contains a patch that will likely fix all of the
problems you've run into, and some discussion on why it's not in yet. If you
find it to fix the problem you have, and it's unsolvable otherwise, feel free to
go ahead and check it in.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |20126
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-07-09 17:13 ` aoliva at gcc dot gnu dot org
@ 2005-07-09 23:31 ` pinskia at gcc dot gnu dot org
2005-07-11 3:56 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-09 23:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-09 23:21 -------
*** Bug 22384 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0/4.1 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-07-09 23:31 ` pinskia at gcc dot gnu dot org
@ 2005-07-11 3:56 ` cvs-commit at gcc dot gnu dot org
2005-08-20 21:09 ` [Bug rtl-optimization/22239] [4.0 " pinskia at gcc dot gnu dot org
2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-11 3:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-11 03:56 -------
Subject: Bug 22239
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: danglin@gcc.gnu.org 2005-07-11 03:56:14
Modified files:
gcc : ChangeLog loop.c
Log message:
PR middle-end/22239
PR target/20126
* loop.c (loop_givs_rescan): Use expand_simple_binop instead of
gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)).
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9401&r2=2.9402
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&r1=1.535&r2=1.536
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-07-11 3:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-08-20 21:09 ` pinskia at gcc dot gnu dot org
2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-20 21:09 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|hppa-unknown-linux-gnu |hppa-*-linux-gnu
GCC host triplet|hppa-unknown-linux-gnu |hppa-*-linux-gnu
GCC target triplet|hppa-unknown-linux-gnu |hppa-*-linux-gnu
Summary|[4.0/4.1 Regression] i- |[4.0 Regression] i-
|cobol.adb:482: error: |cobol.adb:482: error:
|unrecognizable insn |unrecognizable insn
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug rtl-optimization/22239] [4.0 Regression] i-cobol.adb:482: error: unrecognizable insn
2005-06-29 23:36 [Bug middle-end/22239] New: i-cobol.adb:482: error: unrecognizable insn danglin at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-08-20 21:09 ` [Bug rtl-optimization/22239] [4.0 " pinskia at gcc dot gnu dot org
@ 2005-09-27 16:24 ` mmitchel at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:24 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22239
^ permalink raw reply [flat|nested] 15+ messages in thread