This is the mail archive of the gcc-patches@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: [C++/ARM Patch] PR 81942 ("ICE on empty constexpr constructor with C++14")


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


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