https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85807
Bug ID: 85807 Summary: ICEs related to noexcept Product: gcc Version: 8.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: peter.azmanov at transas dot com Target Milestone: --- Created attachment 44138 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44138&action=edit self-contained test After upgrade to version 8.1.0, encountered ICE: "internal compiler error: in check_noexcept_r, at cp/except.c:1027" Slight modifications led to other ICEs. Test script: echo "==== Segfault internal compiler error" /usr/bin/g++ -DSEGFAULT_ERROR test.cpp echo "==== Noexcept internal compiler error" /usr/bin/g++ -DNOEXCEPT_ERROR test.cpp echo "==== Unexpected expression internal compiler error" /usr/bin/g++ -DUNEXPECTED_EXPR_ERROR -Wall test.cpp echo "==== cp_get_fndecl_from_callee internal compiler error (1)" /usr/bin/g++ -DUNEXPECTED_EXPR_ERROR test.cpp echo "==== cp_get_fndecl_from_callee internal compiler error (2)" /usr/bin/g++ test.cpp echo "==== Workaround" /usr/bin/g++ -DWORKAROUND test.cpp Output: ==== Segfault internal compiler error test.cpp: In function ‘value_statistics_t<> calc() [with T = double]’: test.cpp:25:13: internal compiler error: Segmentation fault return {}; ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. ==== Noexcept internal compiler error test.cpp: In instantiation of ‘value_statistics_t<> calc() [with T = double]’: test.cpp:39:46: required from here test.cpp:28:24: internal compiler error: in check_noexcept_r, at cp/except.c:1027 value_statistics_t<> result; ^~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. ==== Unexpected expression internal compiler error test.cpp: In instantiation of ‘value_statistics_t<> calc() [with T = double]’: test.cpp:39:46: required from here test.cpp:31:31: internal compiler error: unexpected expression ‘(size_t)0’ of kind implicit_conv_expr return value_statistics_t<>{}; ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. ==== cp_get_fndecl_from_callee internal compiler error (1) test.cpp: In instantiation of ‘value_statistics_t<> calc() [with T = double]’: test.cpp:39:46: required from here test.cpp:35:1: internal compiler error: in cp_get_fndecl_from_callee, at cp/cvt.c:957 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. ==== cp_get_fndecl_from_callee internal compiler error (2) test.cpp: In instantiation of ‘value_statistics_t<> calc() [with T = double]’: test.cpp:39:46: required from here test.cpp:35:1: internal compiler error: in cp_get_fndecl_from_callee, at cp/cvt.c:957 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.archlinux.org/> for instructions. ==== Workaround