https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81846
Bug ID: 81846 Summary: [arm] constexpr ICE: in cxx_eval_constant_expression, at cp/constexpr.c:4556 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nsz at gcc dot gnu.org Target Milestone: --- following c++14 code fails to compile with ice on arm targets: class A { public: constexpr A() { return; } }; A mwi; $ arm-none-linux-gnueabihf-g++ -S foo.cpp foo.cpp:8:3: in constexpr expansion of ‘mwi.A::A()’ foo.cpp:8:3: internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.c:4556 A mwi; ^~~ ... the assert is 4554 case GOTO_EXPR: 4555 *jump_target = TREE_OPERAND (t, 0); 4556 gcc_assert (breaks (jump_target) || continues (jump_target)); 4557 break; the -tree-original output is unexpected on arm: ;; Function constexpr A::A() (null) ;; enabled by -tree-original { // predicted unlikely by goto predictor.; goto <D.5928>; } <D.5928>:; return this; e.g. on aarch64 it's: ;; Function constexpr A::A() (null) ;; enabled by -tree-original { return; }