This is the mail archive of the gcc@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]

Re: Function clobber_return_register


  /* Before the return label (if any), clobber the return
     registers so that they are not propagated live to the rest of
     the function.  This can only happen with functions that drop
     through; if there had been a return statement, there would
     have either been a return rtx, or a jump to the return label.

But there *was* a jump to the return label and the clobbering was
still done, so I'm confused.

What we had was a CLOBBER, the return label, and a USE.  Then
something (so far undetermined) removed the return label and
redirected the return jump, so that there was a CLOBBER immediately
followed by the USE.  I think you are saying that what's wrong is likely
whatever did that redirection, however, most things after reload (where we
are here) ignore standalone USE and CLOBBERs.

    Since this works for C++, I can only guess that the Ada front
    end isn't generating either returns or cleanups the way the
    back end is expecting.

Well, it actually works fine in most Ada cases and indeed even in this
case until a fix was made to prevent uses of SP from being scheduled
after an assignment to the SP by adding a (clobber (mem:BLK SP)) when
restoring the stack.  So there's something very peculiar about the
precise RTL here.


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