[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #2 from danglin at gcc dot gnu dot org 2006-02-07 22:09 --- Subject: Bug 26109 Author: danglin Date: Tue Feb 7 22:09:52 2006 New Revision: 110721 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110721 Log: PR target/26109 * pa.c (attr_length_indirect_call): Don't return length 8 for distances = 24 when generating code for SOM runtime. (output_indirect_call): Don't use b,l instruction for indirect calls to $$dyncall when generating code for SOM runtime.. Modified: trunk/gcc/ChangeLog trunk/gcc/config/pa/pa.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26109
[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #3 from danglin at gcc dot gnu dot org 2006-02-07 22:11 --- Subject: Bug 26109 Author: danglin Date: Tue Feb 7 22:11:30 2006 New Revision: 110722 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110722 Log: PR target/26109 * pa.c (attr_length_indirect_call): Don't return length 8 for distances = 24 when generating code for SOM runtime. (output_indirect_call): Don't use b,l instruction for indirect calls to $$dyncall when generating code for SOM runtime.. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/pa/pa.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26109
[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #4 from danglin at gcc dot gnu dot org 2006-02-07 22:13 --- Subject: Bug 26109 Author: danglin Date: Tue Feb 7 22:13:22 2006 New Revision: 110723 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110723 Log: PR target/26109 * pa.c (attr_length_indirect_call): Don't return length 8 for distances = 24 when generating code for SOM runtime. (output_indirect_call): Don't use b,l instruction for indirect calls to $$dyncall when generating code for SOM runtime.. Modified: branches/gcc-4_0-branch/gcc/ChangeLog branches/gcc-4_0-branch/gcc/config/pa/pa.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26109
[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #5 from danglin at gcc dot gnu dot org 2006-02-07 22:15 --- Subject: Bug 26109 Author: danglin Date: Tue Feb 7 22:15:30 2006 New Revision: 110724 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=110724 Log: PR target/26109 * pa.c (attr_length_indirect_call): Don't return length 8 for distances = 24 when generating code for SOM runtime. (output_indirect_call): Don't use b,l instruction for indirect calls to $$dyncall when generating code for SOM runtime.. Modified: branches/gcc-3_4-branch/gcc/ChangeLog branches/gcc-3_4-branch/gcc/config/pa/pa.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26109
[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #6 from danglin at gcc dot gnu dot org 2006-02-07 22:17 --- 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=26109
[Bug target/26109] ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1
--- Comment #1 from dave at hiauly1 dot hia dot nrc dot ca 2006-02-05 20:11 --- Subject: Re: ICE: Segmentation fault (program cc1) compiling _muldi3.o in stage1 What|Removed |Added Keywords||wrong-code The problem is with indirect calls. For reasons that I don't understand, the HP linker replaces the code sequence generated by GCC .CALL ARGW0=GR b,l $$dyncall,%r2 copy %r2,%r31 with 0x008d705c htab_create_alloc+92: be,l 27d68(sr4,r0),%sr0,%r31 0x008d7060 htab_create_alloc+96: copy rp,r31 r2 and rp are the same. The b,l is a 22-bit pc-relative branch. It can only use r2 as the link register. The linker has gone and substituted the be,l branch which uses r31 as the link. As a result, r2 isn't set by the call and the code returns a second time to the return point of the previous call. If I was certain that the linker was always going to do the substitution, the the copy could be adjusted. However, the linker can only do the substitution when the offset is a 17-bit offset. When I wrote, the code to use the 22-bit branch, I am fairly certain that I checked that the linker didn't do the be,l substitution when a b,l was used. I guess this optimization has to be removed on hpux. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26109