http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49519
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> 2011-07-05
18:10:24 UTC ---
(In reply to comment #7)
> Expanding arguments in different ways occurs because corresponding GIMPLE
> statements are of different types.
> For 'good' case we have expression of type
> COMPONENT_REF
>
> While for 'bad' one it is just a
> MEM_REF
>
> For that different kinds we have slightly different expanding.
>
> The different expression types comes from front-end, at least in einline phase
> accesses are different:
The front end doesn't create MEM_REFs, they are all produced in the middle end.
If tail call optimizations have trouble with them, that sounds like the bug.
I'm unable to reproduce your work; when I compile step-14.cc I never hit
mem_overlaps_already_clobbered_arg_p while compiling do_call. And reverting my
change to tsubst_arg_types doesn't affect the use of MEM_REF in do_call. What
optimization options are you using? I'm using -O -fipa-sra
-foptimize-sibling-calls, as mentioned.