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: strange use of function_invariant_p


On 06/18/10 09:41, Joern Rennecke wrote:
> I found in an as-yet unreleased port that I had to use an UNSPEC as a
> placeholder for the return address; it is conceivable that you want
> to express the location of return address as the sum of the stack pointer
> and an as-yet unknown constant integer which you could express as
> (CONST (UNSPEC ...)) .

That's what register elimination is for?  If you can't use the hard
frame pointer, define a RETADDR_PTR register and eliminate it to SP.

>> I can't seem to find anything in the mailing list archives corresponding
>> to revision 47226.  The testcase is gcc.dg/20011119-1.c.  I agree the
>> code looks odd.
> 
> Should we put a gcc_unreachable there for now and a comment to remove
> the code
> if it doesn't trigger for a while?

A better plan would be to go see if the testcase fails if the patch is
reverted in current sources, and if not, go back to r47225 and debug it
again.


Bernd


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