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 middle-end/25335] New: reload leaves insns from earlier passes around: fatal for postinc


See assembly output for gcc.target/cris/rld-legit2.c (here for cris-axis-elf):
_g:
        subq 4,$sp
        move $srp,[$sp]
        subq 40,$sp
        movem $r8,[$sp]
        move $r10,$srp
        move.d $r11,[$sp+36]
        move $srp,$r9
        addq 2,$r9
        move $r9,$srp
        subq 2,$r9
        move.w [$r9+],$r11
        move.w [$r9+],$r12
        movs.w $r12,$r12
        move.d [$sp+36],$r13
        clear.b [$r12+$r13.b]
        move $srp,$r10
        movem [$sp+],$r8
        addq 4,$sp
        jump [$sp+]

Note the two post-increments; the second one is used and gets the wrong value.
(A failing executable test-case can trivially be constructed and will be.)
Reload seems to need two rounds, but the emitted reload insns for each pass
is left around. This is exposed but not actually caused by the fix for
PR middle-end/24912.


-- 
           Summary: reload leaves insns from earlier passes around: fatal
                    for postinc
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hp at gcc dot gnu dot org
GCC target triplet: cris-*-*


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


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