This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

BOOTSTRAP FAILURE: segementation fault in genattrtab under hpux 10.20


The following error occurs in the second stage bootstrapping under hpux 10.20
with yesterdays cvs source for 2.97:

stage1/xgcc -Bstage1/ -B/usr/local/hppa1.1-hp-hpux10.20/bin/  -DIN_GCC    -g -O3 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H  -o genattrtab \
 genattrtab.o rtl.o bitmap.o ggc-none.o gensupport.o print-rtl.o errors.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case "alloca.o" in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac ` 
./genattrtab ../../gcc/config/pa/pa.md > tmp-attrtab.c
/bin/sh: 2314 Memory fault(coredump)
make[2]: *** [s-attrtab] Error 139
make[2]: Leaving directory `/xxx/gnu/gcc-2.97/objdir/gcc'
make[1]: *** [stage_c] Error 2
make[1]: Leaving directory `/xxx/gnu/gcc-2.97/objdir/gcc'
make: *** [bootstrap3] Error 2

The fault occurs in the return from insert_insn_ent.  This is the C and
generated assembler:

insert_insn_ent (av, ie)
     struct attr_value *av;
     struct insn_ent *ie;
{
  ie->next = av->first_insn;
  av->first_insn = ie;
  av->num_insns++;
  if (ie->insn_code == -1)
  av->has_asm_insn = 1;

  num_insn_ents++;
}

Dump of assembler code for function insert_insn_ent:
0x11c18 <insert_insn_ent>:      ldw  c(sr0,r26),rp
0x11c1c <insert_insn_ent+4>:    addil 0,dp,%r1
0x11c20 <insert_insn_ent+8>:    ldw  8(sr0,r26),r21
0x11c24 <insert_insn_ent+12>:   ldo 4e4(r1),r1
0x11c28 <insert_insn_ent+16>:   ldo 1(rp),r19
0x11c2c <insert_insn_ent+20>:   stw  r19,c(sr0,r26)
0x11c30 <insert_insn_ent+24>:   ldw  4(sr0,r25),r20
0x11c34 <insert_insn_ent+28>:   stw  r21,0(sr0,r25)
0x11c38 <insert_insn_ent+32>:   cmpib,= -1,r20,0x11c50 <insert_insn_ent+56>
0x11c3c <insert_insn_ent+36>:   stw  r25,8(sr0,r26)
0x11c40 <insert_insn_ent+40>:   ldw  0(sr0,r1),rp
0x11c44 <insert_insn_ent+44>:   ldo 1(rp),r19
0x11c48 <insert_insn_ent+48>:   bv r0(rp)
0x11c4c <insert_insn_ent+52>:   stw  r19,0(sr0,r1)
0x11c50 <insert_insn_ent+56>:   ldi 1,r19
0x11c54 <insert_insn_ent+60>:   b,l 0x11c40 <insert_insn_ent+40>,r0
0x11c58 <insert_insn_ent+64>:   stw r19,10(sr0,r26)
End of assembler dump.

As can be seen, the return pointer rp has been used as a scratch register.
Its value at the first return is 0.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]