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]
Other format: [Raw text]

[Bug target/32313] New: [4.3 Regression] Bootstrap failure running gengtype in stage 2.


At revision 125625 (and 125652) There is a bootstrap failure due to a SIGSEGV
while running gengtype in stage 2.

A successful bootstrap was done for r125494.

I think the dataflow branch merge is a likely culprit here.

The problem is that $gp is not being restored before a call to a local
function.  Here is the dissassembly:
00003498 <write_func_for_structure>:
    3498:       3c1c0000        lui     gp,0x0
                        3498: R_MIPS_HI16       __gnu_local_gp
    349c:       27bdff58        addiu   sp,sp,-168
    34a0:       279c0000        addiu   gp,gp,0
                        34a0: R_MIPS_LO16       __gnu_local_gp
    34a4:       afbf00a4        sw      ra,164(sp)
    34a8:       afbe00a0        sw      s8,160(sp)
    34ac:       afb7009c        sw      s7,156(sp)
    34b0:       afb60098        sw      s6,152(sp)
    34b4:       afb50094        sw      s5,148(sp)
    34b8:       afb40090        sw      s4,144(sp)
    34bc:       afb3008c        sw      s3,140(sp)
    34c0:       afb20088        sw      s2,136(sp)
    34c4:       afb10084        sw      s1,132(sp)
    34c8:       afb00080        sw      s0,128(sp)
    34cc:       afbc0020        sw      gp,32(sp)
    34d0:       8cb00014        lw      s0,20(a1)
    34d4:       00c0a021        move    s4,a2
    34d8:       afa400a8        sw      a0,168(sp)
    34dc:       afa700b4        sw      a3,180(sp)
    34e0:       00a0f021        move    s8,a1
    34e4:       00002021        move    a0,zero
    34e8:       24070004        li      a3,4
    34ec:       24080006        li      t0,6
    34f0:       2406ffd8        li      a2,-40
    34f4:       02841021        addu    v0,s4,a0
    34f8:       12800007        beqz    s4,3518 <write_func_for_structure+0x80>
    34fc:       2484fffc        addiu   a0,a0,-4
    3500:       8c430024        lw      v1,36(v0)
    3504:       10600004        beqz    v1,3518 <write_func_for_structure+0x80>
    3508:       00000000        nop
    350c:       8c620000        lw      v0,0(v1)
    3510:       1047012e        beq     v0,a3,39cc
<write_func_for_structure+0x534>
    3514:       00000000        nop
    3518:       1486fff7        bne     a0,a2,34f8
<write_func_for_structure+0x60>
    351c:       02841021        addu    v0,s4,a0
    3520:       8f990000        lw      t9,0(gp)
                        3520: R_MIPS_CALL16     memset
    3524:       27a20028        addiu   v0,sp,40
    3528:       00002821        move    a1,zero
    352c:       24060048        li      a2,72
    3530:       00402021        move    a0,v0
    3534:       0320f809        jalr    t9
    3538:       afa20078        sw      v0,120(sp)
    353c:       0c000000        jal     0 <get_lang_bitmap>
                        353c: R_MIPS_26 get_output_file_with_visibility
    3540:       02002021        move    a0,s0

After the call to memset the gp should be restored.  It is required by the call
to get_output_file_with_visibility.


-- 
           Summary: [4.3 Regression] Bootstrap failure running gengtype in
                    stage 2.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: daney at gcc dot gnu dot org
 GCC build triplet: mipsel-linux-gnu
  GCC host triplet: mipsel-linux-gnu
GCC target triplet: mipsel-linux-gnu


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


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