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

--- Comment #10 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Hans-Peter Nilsson from comment #0)
> The -ftree-dump-original output shows an extra
> return statement for the listed target, which looks correlated.  (I have not
> traced its target-specific origin.)

It's the target hook cdtor_returns_this (TARGET_CXX_CDTOR_RETURNS_THIS), set to
true by arm*-eabi* and *-darwin*.  As can be guessed from the name, it
returning true necessarily forces cdtor arguments to be expanded (evaluated) at
the call when true.  A fix would be to force those to be evaluated regardless,
then maybe thrown away.  Not sure how to do that though...

Reply via email to