PR c++/93324 - ICE with -Wall on constexpr if.
commit15ed55eabb0cf8a2974b8025a9f46c9e58960811
authorMarek Polacek <polacek@redhat.com>
Wed, 22 Jan 2020 16:44:13 +0000 (22 11:44 -0500)
committerMarek Polacek <polacek@redhat.com>
Wed, 22 Jan 2020 16:44:13 +0000 (22 11:44 -0500)
tree4f2efc2b13abc0a38a5ff2385d61e6ef30fd27a0
parentbf91504dc23f17248df6302f7bad849f3ddedee7
PR c++/93324 - ICE with -Wall on constexpr if.

This is a crash with constexpr if, when trying to see if the call in
the if-statement is std::is_constant_evaluated.

cp_get_callee_fndecl_nofold can return NULL_TREE and fndecl_built_in_p
doesn't expect to get a null tree, so check FNDECL first.
gcc/cp/ChangeLog
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp1z/constexpr-if33.C [new file with mode: 0644]