[Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937 --- Comment #21 from CVS Commits --- The releases/gcc-10 branch has been updated by Marek Polacek : https://gcc.gnu.org/g:de946847b7cf88c503c6e843fc6263ef7a1911fc commit r10-8279-gde946847b7cf88c503c6e843fc6263ef7a1911fc Author: Marek Polacek Date: Thu Jun 11 16:29:57 2020 -0400 c++: ICE with -Wall and constexpr if [PR94937] An ICE arises here because we call cp_get_callee_fndecl_nofold in a template, and we've got a CALL_EXPR whose CALL_EXPR_FN is a BASELINK. This tickles the INDIRECT_TYPE_P assert in cp_get_fndecl_from_callee. Fixed by turning the assert into a condition and returning NULL_TREE in that case. PR c++/94937 * cvt.c (cp_get_fndecl_from_callee): Return NULL_TREE if the function type is not INDIRECT_TYPE_P. * decl.c (omp_declare_variant_finalize_one): Call cp_get_callee_fndecl_nofold instead of looking for the function decl manually. * g++.dg/cpp1z/constexpr-if34.C: New test. * g++.dg/cpp2a/is-constant-evaluated10.C: New test.
[Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937 Marek Polacek changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #22 from Marek Polacek --- Fixed.
[Bug c++/94937] [10 Regression] ICE with if constexpr (in cp_get_fndecl_from_callee, at cp/cvt.c:1000) since r10-2835-g14da3939da3adcef
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94937 Marek Polacek changed: What|Removed |Added Summary|[10/11 Regression] ICE with |[10 Regression] ICE with if |if constexpr (in|constexpr (in |cp_get_fndecl_from_callee, |cp_get_fndecl_from_callee, |at cp/cvt.c:1000) since |at cp/cvt.c:1000) since |r10-2835-g14da3939da3adcef |r10-2835-g14da3939da3adcef --- Comment #20 from Marek Polacek --- Fixed on trunk so far.