public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/34762]  New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
@ 2008-01-12 21:04 tausq at debian dot org
  2008-01-12 21:14 ` [Bug c/34762] " tausq at debian dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: tausq at debian dot org @ 2008-01-12 21:04 UTC (permalink / raw)
  To: gcc-bugs

While building RPM on hppa with gcc-4.2, build fails with the captioned error.
Somewhat reduced testcase attached.

Builds fine with -O1 or without -fPIC, or with older compilers.

ffmpeg and squashfs also fail to build with a similar error (not always built
with  -fPIC)


-- 
           Summary: [4.2 regression] internal compiler error: in
                    delete_output_reload, at reload1.c:7958
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tausq at debian dot org
 GCC build triplet: hppa-linux
  GCC host triplet: hppa-linux
GCC target triplet: hppa-linux


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
@ 2008-01-12 21:14 ` tausq at debian dot org
  2008-01-12 22:16 ` [Bug target/34762] " rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tausq at debian dot org @ 2008-01-12 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tausq at debian dot org  2008-01-12 20:54 -------
Created an attachment (id=14931)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14931&action=view)
Testcase


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
  2008-01-12 21:14 ` [Bug c/34762] " tausq at debian dot org
@ 2008-01-12 22:16 ` rguenth at gcc dot gnu dot org
  2008-01-13  2:17 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-01-12 22:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2008-01-12 21:44 -------
Probably a dup of PR32889.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
  2008-01-12 21:14 ` [Bug c/34762] " tausq at debian dot org
  2008-01-12 22:16 ` [Bug target/34762] " rguenth at gcc dot gnu dot org
@ 2008-01-13  2:17 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-01-13  2:21 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-01-13  2:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2008-01-13 01:46 -------
Subject: Re:  [4.2 regression] internal compiler error: in
delete_output_reload, at reload1.c:7958

> Probably a dup of PR32889.

Agreed but the current 4.2 branch still ICEs.  The failure doesn't
occur with 4.3.

I'm having difficulty understanding why this was classified as target
bug.  It appears to me to be a middle-end (reload) bug.

Before the ICE, we handle a very similar reload:

Starting program: /home/dave/gcc-4.2/objdir/stage1-gcc/cc1 -fpreprocessed
pr34762.i -dumpbase pr34762.i -auxbase pr34762 -O2 -version -o pr34762.s -fPIC
GNU C version 4.2.3 20080106 (prerelease) (hppa-linux)
        compiled by GNU C version 4.1.0.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed:  -fpreprocessed -auxbase -O2 -fPIC
options enabled:  -fPIC -falign-loops -fargument-alias -fbranch-count-reg
 -fcaller-saves -fcommon -fcprop-registers -fcrossjumping
 -fcse-follow-jumps -fcse-skip-blocks -fdefer-pop -fdelayed-branch
 -fdelete-null-pointer-checks -fearly-inlining
 -feliminate-unused-debug-types -fexpensive-optimizations -ffunction-cse
 -fgcse -fgcse-lm -fguess-branch-probability -fident -fif-conversion
 -fif-conversion2 -finline-functions-called-once -fipa-pure-const
 -fipa-reference -fipa-type-escape -fivopts -fkeep-static-consts
 -fleading-underscore -fmath-errno -fmerge-constants -fmove-loop-invariants
 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls
 -fpeephole -fpeephole2 -freg-struct-return -fregmove -freorder-blocks
 -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec
 -fsched-stalled-insns-dep -fschedule-insns -fschedule-insns2 -fshow-column
 -fsplit-ivs-in-unroller -fstrict-aliasing -fstrict-overflow -fthread-jumps
 -ftoplevel-reorder -ftrapping-math -ftree-ccp -ftree-ch -ftree-copy-prop
 -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre
 -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize -ftree-lrs
 -ftree-pre -ftree-salias -ftree-sink -ftree-sra -ftree-store-ccp
 -ftree-store-copy-prop -ftree-ter -ftree-vect-loop-version -ftree-vrp
 -funit-at-a-time -fvar-tracking -fzero-initialized-in-bss -mbig-switch
 -mgas -mglibc -mno-space-regs
Compiler executable checksum: 7052689d04078c8c580b43f74ef2f4ae
gnu_dev_major gnu_dev_minor gnu_dev_makedev stat lstat fstat fstatat mknod
mknodat stat64 lstat64 fstat64 fstatat64 vprintf getchar fgetc_unlocked
getc_unlocked getchar_unlocked putchar fputc_unlocked putc_unlocked
putchar_unlocked getline feof_unlocked ferror_unlocked __strcspn_c1
__strcspn_c2 __strcspn_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2
__strpbrk_c3 __strtok_r_1c __strsep_1c __strsep_2c __strsep_3c strtod strtol
strtoul strtof strtold strtoq strtouq strtoll strtoull atof atoi atol atoll
tolower toupper __sigismember __sigaddset __sigdelset __cmsg_nxthdr xislower
xisupper xisalpha xisdigit xisalnum xisblank xisspace xtolower xtoupper
headerFreeData h2hv headerNew headerFree headerLink headerUnlink headerSort
headerUnsort headerSizeof headerUnload headerReload headerCopy headerLoad
headerCopyLoad headerRead headerWrite headerIsEntry headerFreeTag
headerGetEntry headerGetEntryMinMemory headerAddEntry headerAppendEntry
headerAddOrAppendEntry headerAddI18NStrin!
 g headerModifyEntry headerRemoveEntry headerSprintf headerCopyTags
headerFreeIterator headerInitIterator headerNextIterator _free tag2sln
runLuaScript runScript runInstScript start
Analyzing compilation unitPerforming interprocedural optimizations
Assembling functions:
tag2sln headerFreeData runInstScript
Breakpoint 1, emit_move_sequence (operands=0xfb6c74cc, mode=SImode,
    scratch_reg=0x0) at ../../gcc/gcc/config/pa/pa.c:1332
1332      register rtx operand0 = operands[0];
(gdb) p debug_rtx (operands[0])
(reg:SI 21 %r21)
$18 = void
(gdb) p debug_rtx (operands[1])
(const_int 8252 [0x203c])
$19 = void
(gdb) bt
#0  emit_move_sequence (operands=0xfb6c74cc, mode=SImode, scratch_reg=0x0)
    at ../../gcc/gcc/config/pa/pa.c:1332
#1  0x0052d0e4 in gen_movsi (operand0=0x403bed70, operand1=0x403b67a0)
    at ../../gcc/gcc/config/pa/pa.md:2430
#2  0x003f1354 in emit_move_insn_1 (x=0x403bed70, y=0x403b67a0)
    at ../../gcc/gcc/expr.c:3225
#3  0x0057a2d4 in gen_move_insn (x=0x403bed70, y=0x403b67a0)
    at ../../gcc/gcc/optabs.c:4399
#4  0x006096d8 in gen_reload (out=0x403bed70, in=0x403b67a0, opnum=0,
    type=RELOAD_FOR_OUTPUT_ADDRESS) at ../../gcc/gcc/reload1.c:7839
#5  0x0060934c in gen_reload (out=0x403bed70, in=0x403bed40, opnum=0,
    type=RELOAD_FOR_OUTPUT_ADDRESS) at ../../gcc/gcc/reload1.c:7746
#6  0x006055ac in emit_input_reload_insns (chain=0xadfdf8, rl=0xa3b00c,
    old=0x403bed40, j=0) at ../../gcc/gcc/reload1.c:6798
#7  0x006064d8 in do_input_reload (chain=0xadfdf8, rl=0xa3b00c, j=0)
    at ../../gcc/gcc/reload1.c:7055
#8  0x00606fdc in emit_reload_insns (chain=0xadfdf8)
    at ../../gcc/gcc/reload1.c:7228
...
(gdb) c
Continuing

Breakpoint 2, delete_output_reload (insn=0x403a6f28, j=1, last_reload_reg=5)
    at ../../gcc/gcc/reload1.c:7932
7932          gcc_assert (!rtx_equal_p (XEXP (i1, 0), substed));
(gdb) p debug_rtx (insn)
(insn 314 313 315 25 (set (mem/c:SI (plus:SI (reg/f:SI 3 %r3)
                (const_int 8256 [0x2040])) [89 freePrefixes+0 S4 A32])
        (const_int 0 [0x0])) 37 {*pa.md:2484} (nil)
    (nil))
$22 = void
(gdb) p debug_rtx (substed)
(mem/c:SI (plus:SI (reg/f:SI 3 %r3)
        (const_int 8256 [0x2040])) [89 freePrefixes+0 S4 A32])
$23 = void
(gdb) p debug_rtx (i1)
(expr_list:REG_EQUIV (mem/c:SI (plus:SI (reg/f:SI 3 %r3)
            (const_int 8256 [0x2040])) [89 freePrefixes+0 S4 A32])
    (nil))
$24 = void

The backend doesn't generate REG_EQUIV notes.

>From pr34762.i.138r.greg, the first reload is

Reloads for insn # 307
Reload 0: reload_in (SI) = (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040]))
        GENERAL_REGS, RELOAD_FOR_OPERAND_ADDRESS (opnum = 0), can't combine
        reload_in_reg: (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040]))
        reload_reg_rtx: (reg:SI 20 %r20)
Reload 1: reload_out (SI) = (mem/c:SI (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040] ))
[89 freePrefixes+0 S4 A32])
        NO_REGS, RELOAD_FOR_OUTPUT (opnum = 0), optional
        reload_out_reg: (reg/v:SI 208 [ freePrefixes ])

Then, we fail with with this one

Reloads for insn # 314
Reload 0: reload_in (SI) = (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040]))
        GENERAL_REGS, RELOAD_FOR_OPERAND_ADDRESS (opnum = 0), can't combine
        reload_in_reg: (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040]))
        reload_reg_rtx: (reg:SI 21 %r21)
Reload 1: reload_out (SI) = (mem/c:SI (plus:SI (reg/f:SI 3 %r3)
                                                    (const_int 8256 [0x2040] ))
[89 freePrefixes+0 S4 A32])
        NO_REGS, RELOAD_FOR_OUTPUT (opnum = 0), optional
        reload_out_reg: (reg/v:SI 208 [ freePrefixes ])

Dave


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (2 preceding siblings ...)
  2008-01-13  2:17 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-01-13  2:21 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-01-13  2:32 ` [Bug middle-end/34762] " danglin at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-01-13  2:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca  2008-01-13 01:52 -------
Subject: Re:  [4.2 regression] internal compiler error: in
delete_output_reload, at reload1.c:7958

These are insns 307 and 314 from the greg pass.

> Reloads for insn # 307

(insn 307 280 281 24 (set (reg/v:SI 208 [ freePrefixes ])
        (reg:SI 264)) 37 {*pa.md:2484} (nil)
    (nil))

> Reloads for insn # 314

(insn 314 313 315 25 (set (reg/v:SI 208 [ freePrefixes ])
        (const_int 0 [0x0])) 37 {*pa.md:2484} (nil)
    (nil))

Dave


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (3 preceding siblings ...)
  2008-01-13  2:21 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-01-13  2:32 ` danglin at gcc dot gnu dot org
  2008-01-13  5:52 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-01-13  2:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from danglin at gcc dot gnu dot org  2008-01-13 02:21 -------
Appears to me to be a reload bug.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (4 preceding siblings ...)
  2008-01-13  2:32 ` [Bug middle-end/34762] " danglin at gcc dot gnu dot org
@ 2008-01-13  5:52 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-01-13 17:02 ` danglin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-01-13  5:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2008-01-13 02:52 -------
Subject: Re:  [4.2 regression] internal compiler
        error: in delete_output_reload, at reload1.c:7958

> Appears to me to be a reload bug.

This is totally untested but I believe the attached patch will fix
this bug.

Dave


------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca  2008-01-13 02:52 -------
Created an attachment (id=14934)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14934&action=view)


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (5 preceding siblings ...)
  2008-01-13  5:52 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-01-13 17:02 ` danglin at gcc dot gnu dot org
  2008-01-13 17:42 ` danglin at gcc dot gnu dot org
  2008-02-23 21:25 ` eager at eagercon dot com
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-01-13 17:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from danglin at gcc dot gnu dot org  2008-01-13 16:53 -------
Subject: Bug 34762

Author: danglin
Date: Sun Jan 13 16:53:02 2008
New Revision: 131508

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131508
Log:
        PR middle-end/34762
        * reload.c (find_reloads_toplev): Use rtx_equal_p to compare x and mem.


Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/reload.c


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (6 preceding siblings ...)
  2008-01-13 17:02 ` danglin at gcc dot gnu dot org
@ 2008-01-13 17:42 ` danglin at gcc dot gnu dot org
  2008-02-23 21:25 ` eager at eagercon dot com
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-01-13 17:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from danglin at gcc dot gnu dot org  2008-01-13 16:55 -------
Fixed by patch.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug middle-end/34762] [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958
  2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
                   ` (7 preceding siblings ...)
  2008-01-13 17:42 ` danglin at gcc dot gnu dot org
@ 2008-02-23 21:25 ` eager at eagercon dot com
  8 siblings, 0 replies; 10+ messages in thread
From: eager at eagercon dot com @ 2008-02-23 21:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from eager at eagercon dot com  2008-02-23 21:24 -------
Created an attachment (id=15216)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15216&action=view)
More complete fix for reload.c

This is a more complete patch to reload.c.
Duplicate of fix for bug 32889.


-- 


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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-02-23 21:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-12 21:04 [Bug c/34762] New: [4.2 regression] internal compiler error: in delete_output_reload, at reload1.c:7958 tausq at debian dot org
2008-01-12 21:14 ` [Bug c/34762] " tausq at debian dot org
2008-01-12 22:16 ` [Bug target/34762] " rguenth at gcc dot gnu dot org
2008-01-13  2:17 ` dave at hiauly1 dot hia dot nrc dot ca
2008-01-13  2:21 ` dave at hiauly1 dot hia dot nrc dot ca
2008-01-13  2:32 ` [Bug middle-end/34762] " danglin at gcc dot gnu dot org
2008-01-13  5:52 ` dave at hiauly1 dot hia dot nrc dot ca
2008-01-13 17:02 ` danglin at gcc dot gnu dot org
2008-01-13 17:42 ` danglin at gcc dot gnu dot org
2008-02-23 21:25 ` eager at eagercon dot com

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).