https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71793

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to DB from comment #2)
> Thanks Richard! About this -
> 
> > RTL expansion expands x as register copy for some reason
> 
> - is this person's explanation about this originating in the ABI accurate?
> http://stackoverflow.com/a/38248847/2757035
> 
> If so - again not that I expect anyone really to use this pattern! - but
> from a Standard perspective, I'm interested whether it forbids such register
> allocation, and whether any workaround is feasible. In practical terms, a
> very academic exercise :-) but valuable for its implications wrt the
> Standard and ABI

Well, if you look at the out-of-line copies of the function then he is correct.
But the inline copy in main() does not have this constraint and is still
mishandled.  Note I didn't yet investigate closer what is going on.

Reply via email to