On 09/05/2017 06:19 AM, Paolo Carlini wrote:
in this ICE on valid, a gcc_assert fires when a GOTO_EXPR is handled by
cxx_eval_constant_expression which is the translation of a "return;" on
a targetm.cxx.cdtor_returns_this target (like ARM):
I think the right way to handle this is marking such special labels with
a LABEL_DECL_CDTOR flag and using it in the returns helper function (we
already use a similar strategy with LABEL_DECL_BREAK and
LABEL_DECL_CONTINUE and the breaks and continues helpers). Then
adjusting the ICEing gcc_assert is trivial. Tested x86_64-linux and
aarch64-linux.
OK.
(heh, i notice we call the hook 'cdtor_returns_this', but AFAICT it only
applies to ctors. Not your problem though.)
nathan
--
Nathan Sidwell