Launchpad has imported 11 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34762.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://documentation.ubuntu.com/launchpad/user/reference/bugs/multi-project-bugs/about-multi-project-bugs/#bugs-in-external-trackers.

------------------------------------------------------------------------
On 2008-01-12T20:52:28+00:00 Randolph Chung wrote:

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)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/0

------------------------------------------------------------------------
On 2008-01-12T20:54:01+00:00 Randolph Chung wrote:

Created attachment 14931
Testcase

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/1

------------------------------------------------------------------------
On 2008-01-12T21:44:39+00:00 Rguenth wrote:

Probably a dup of PR32889.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/2

------------------------------------------------------------------------
On 2008-01-13T01:46:11+00:00 John David Anglin wrote:

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


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/4

------------------------------------------------------------------------
On 2008-01-13T01:52:09+00:00 John David Anglin wrote:

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


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/5

------------------------------------------------------------------------
On 2008-01-13T02:21:50+00:00 Danglin wrote:

Appears to me to be a reload bug.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/7

------------------------------------------------------------------------
On 2008-01-13T02:52:09+00:00 John David Anglin wrote:

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


Reply at: 
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/8

------------------------------------------------------------------------
On 2008-01-13T02:52:09+00:00 John David Anglin wrote:

Created attachment 14934
reload.c.d

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/9

------------------------------------------------------------------------
On 2008-01-13T16:53:46+00:00 Danglin wrote:

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


Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/10

------------------------------------------------------------------------
On 2008-01-13T16:55:20+00:00 Danglin wrote:

Fixed by patch.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/11

------------------------------------------------------------------------
On 2008-02-23T21:24:25+00:00 Mike Eager wrote:

Created attachment 15216
More complete fix for reload.c

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

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/182412/comments/13

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/182412

Title:
  ICE on hppa

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/182412/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to