On Sun, Jan 19, 2020 at 03:34:48PM -0500, Marek Polacek wrote:
> Bootstrapped/regtested on x86_64-linux, ok for trunk?
>
> * semantics.c (is_std_constant_evaluated_p): Check fndecl.
>
> * g++.dg/cpp1z/constexpr-if33.C: New test.
> ---
> gcc/cp/semantics.c |
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.
Bootstrapped/regtested on x86_64-linux, ok for trun