public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/37608]  New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
@ 2008-09-21 14:05 danglin at gcc dot gnu dot org
  2008-09-21 14:20 ` [Bug middle-end/37608] " rguenth at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-09-21 14:05 UTC (permalink / raw)
  To: gcc-bugs

The following error has occurred since I defined IRA_COVER_CLASSES on the
hppa64-hp-hpux11.11:

/test/gnu/gcc/objdir/./gcc/xgcc -B/test/gnu/gcc/objdir/./gcc/
-B/opt/gnu64/gcc/g
cc-4.4.0/hppa64-hp-hpux11.11/bin/
-B/opt/gnu64/gcc/gcc-4.4.0/hppa64-hp-hpux11.11
/lib/ -isystem /opt/gnu64/gcc/gcc-4.4.0/hppa64-hp-hpux11.11/include -isystem
/op
t/gnu64/gcc/gcc-4.4.0/hppa64-hp-hpux11.11/sys-include -g -O2 -O2  -g -O2
-DIN_GC
C   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wcast-qua
l -Wold-style-definition  -isystem ./include  -fPIC -Dpa64=1 -DELF=1
-mlong-call
s -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
-I../..
/./gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/.
-I../../../gcc/libgcc/../gc
c -I../../../gcc/libgcc/../include  -DHAVE_CC_TLS -o __gcc_bcmp.o -MT
__gcc_bcmp
.o -MD -MP -MF __gcc_bcmp.dep -DL__gcc_bcmp -c
../../../gcc/libgcc/../gcc/libgcc
2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
../../../gcc/libgcc/../gcc/libgcc2.c: In function '__gcc_bcmp':
../../../gcc/libgcc/../gcc/libgcc2.c:1981: internal compiler error: vector
VEC(m
em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at
tree-ssa-lo
op-im.c:1519

-bash-3.2$ ./xgcc -B./ -v
Reading specs from ./specs
Target: hppa64-hp-hpux11.11
Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --disable-nls
--with-local-prefix=/opt/gnu64 --prefix=/opt/gnu64/gcc/gcc-4.4.0
--build=hppa64-hp-hpux11.11 --enable-threads=posix --disable-libmudflap
--with-gmp=/opt/gnu64/gcc/gcc-4.4.0 --enable-languages=c
Thread model: posix
gcc version 4.4.0 20080921 (experimental) [trunk revision 140520] (GCC) 

I know that create_vop_ref_mapping_loop is miscompiled by the stage 1 compiler.
Replacing the tree-ssa-loop-im.o objects generated in stage 2 and 3 with the
stage 1 object allows bootstrap to complete.  Also, changing the function
create_vop_ref_mapping_loop from static to global allows a successful
bootstrap.


-- 
           Summary: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m
                    em_ref_p,base) index domain error, in
                    create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.11
  GCC host triplet: hppa64-hp-hpux11.11
GCC target triplet: hppa64-hp-hpux11.11


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
@ 2008-09-21 14:20 ` rguenth at gcc dot gnu dot org
  2008-09-22  2:54 ` danglin at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-21 14:20 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
  2008-09-21 14:20 ` [Bug middle-end/37608] " rguenth at gcc dot gnu dot org
@ 2008-09-22  2:54 ` danglin at gcc dot gnu dot org
  2008-09-22  3:02 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-09-22  2:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2008-09-22 02:52 -------
After looking at this a bit, the problem seems to be in the register
allocation for this bit of code:

0x40000000005da2a8 <tree_ssa_lim+2688>: ldo 1(r4),ret0
0x40000000005da2ac <tree_ssa_lim+2692>: extrd,u r17,62,63,r17
0x40000000005da2b0 <tree_ssa_lim+2696>: b,l 0x40000000005d9ee0
<tree_ssa_lim+1720>,r0
0x40000000005da2b4 <tree_ssa_lim+2700>: extrd,u ret0,63,32,r4

After the last extrd,u, we have

(gdb) p/x $ret0
$5 = 0x80000001000e7859
(gdb) p/x $r4
$7 = 0xe7859

The above code corresponds to

static inline void
bmp_iter_next (bitmap_iterator *bi, unsigned *bit_no)
{
  bi->bits >>= 1;
  *bit_no += 1;
}

The value in r4 is wrong. r4 is used to save and restore the PIC register
across function calls.  The PIC register value is

(gdb) p/x $dp  
$27 = 0x80000001000e7858

Looking back, the last call which isn't inlined is to bitmap_set_bit in
record_vop_access.

0x40000000005da034 <tree_ssa_lim+2060>: copy dp,r4
0x40000000005da038 <tree_ssa_lim+2064>: ldd 8(ret0),r15
0x40000000005da03c <tree_ssa_lim+2068>: copy r9,ret1
0x40000000005da040 <tree_ssa_lim+2072>: b,l 0x40000000002142c0
<bitmap_bit_p>,rp
0x40000000005da044 <tree_ssa_lim+2076>: ldd 10(r11),r26
0x40000000005da048 <tree_ssa_lim+2080>: copy r4,dp

r4 doesn't change value from this point to the ICE.

I believe r4 is initialized, but it is clobbered by a multitude of calls
after initialization.  So, the question is why r4 was used in the first
place.  This would seem like another clobber related issue.  The PIC
call patterns all use a clobber to reserve r4.  However, Richard's patch,
<http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01433.html>, didn't resolve
the issue.


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
  2008-09-21 14:20 ` [Bug middle-end/37608] " rguenth at gcc dot gnu dot org
  2008-09-22  2:54 ` danglin at gcc dot gnu dot org
@ 2008-09-22  3:02 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-09-22  3:04 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-09-22  3:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 03:01 -------
Subject: Re:  [4.4 Regression] libgcc2.c:1981: ICE:
        vector VEC(m em_ref_p,base) index domain error, in
        create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519

Attached tree-ssa-loop-im.c.174r.ira.bz2.

Dave


------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 03:01 -------
Created an attachment (id=16373)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16373&action=view)


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-09-22  3:02 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-09-22  3:04 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-09-22 14:12 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-09-22  3:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 03:02 -------
Subject: Re:  [4.4 Regression] libgcc2.c:1981: ICE:
        vector VEC(m em_ref_p,base) index domain error, in
        create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519

Attached tree-ssa-loop-im.s.bz2 generated with stage1 compiler.

Dave


------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 03:02 -------
Created an attachment (id=16374)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16374&action=view)


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-09-22  3:04 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-09-22 14:12 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-10-11 15:20 ` danglin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-09-22 14:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 14:11 -------
Subject: Re:  [4.4 Regression] libgcc2.c:1981: ICE:
        vector VEC(m em_ref_p,base) index domain error, in
        create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519

Attached .i.

Dave


------- Comment #7 from dave at hiauly1 dot hia dot nrc dot ca  2008-09-22 14:11 -------
Created an attachment (id=16379)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16379&action=view)


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-09-22 14:12 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-10-11 15:20 ` danglin at gcc dot gnu dot org
  2008-10-11 15:56 ` danglin at gcc dot gnu dot org
  2008-10-11 16:03 ` danglin at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-10-11 15:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from danglin at gcc dot gnu dot org  2008-10-11 15:18 -------
*** Bug 37299 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-10-11 15:20 ` danglin at gcc dot gnu dot org
@ 2008-10-11 15:56 ` danglin at gcc dot gnu dot org
  2008-10-11 16:03 ` danglin at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-10-11 15:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from danglin at gcc dot gnu dot org  2008-10-11 15:55 -------
Subject: Bug 37608

Author: danglin
Date: Sat Oct 11 15:54:27 2008
New Revision: 141063

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141063
Log:
        PR middle-end/37608
        * pa.md (call, call_value): Generate an rtx for register r4 and pass
        it to PIC call patterns.
        (call_symref_pic): Revise pattern to expose PIC register save.  Remove
        code generation and attributes from pattern.  Change peephole2 to split
        for noreturn case.  Revise split pattern for non noreturn case.
        (call_symref_64bit, call_reg_pic, call_reg_64bit, call_val_symref_pic,
        call_val_symref_64bit, call_val_reg_pic, call_val_reg_64bit): Likewise.
        * pa.c (attr_length_call): Simplify extraction of call rtx.  Add some
        asserts.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.c
    trunk/gcc/config/pa/pa.md


-- 


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


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

* [Bug middle-end/37608] [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519
  2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-10-11 15:56 ` danglin at gcc dot gnu dot org
@ 2008-10-11 16:03 ` danglin at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-10-11 16:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from danglin at gcc dot gnu dot org  2008-10-11 16:01 -------
The revised call patterns avoid the hard register clobber bug.


-- 

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=37608


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

end of thread, other threads:[~2008-10-11 16:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-21 14:05 [Bug middle-end/37608] New: [4.4 Regression] libgcc2.c:1981: ICE: vector VEC(m em_ref_p,base) index domain error, in create_vop_ref_mapping_loop at tree-ssa-lo op-im.c:1519 danglin at gcc dot gnu dot org
2008-09-21 14:20 ` [Bug middle-end/37608] " rguenth at gcc dot gnu dot org
2008-09-22  2:54 ` danglin at gcc dot gnu dot org
2008-09-22  3:02 ` dave at hiauly1 dot hia dot nrc dot ca
2008-09-22  3:04 ` dave at hiauly1 dot hia dot nrc dot ca
2008-09-22 14:12 ` dave at hiauly1 dot hia dot nrc dot ca
2008-10-11 15:20 ` danglin at gcc dot gnu dot org
2008-10-11 15:56 ` danglin at gcc dot gnu dot org
2008-10-11 16:03 ` danglin at gcc dot gnu dot 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).