Re: [PATCH] C++: Fix ICE in fold_for_warn on CAST_EXPR (PR c++/83974)

2018-01-23 Thread Jason Merrill
On Tue, Jan 23, 2018 at 9:27 AM, David Malcolm wrote: > PR c++/83974 reports an ICE within fold_for_warn when calling > cxx_eval_constant_expression on a CAST_EXPR. > > This comes from a pointer-to-member-function. The result of > build_ptrmemfunc (within

[PATCH] C++: Fix ICE in fold_for_warn on CAST_EXPR (PR c++/83974)

2018-01-23 Thread David Malcolm
PR c++/83974 reports an ICE within fold_for_warn when calling cxx_eval_constant_expression on a CAST_EXPR. This comes from a pointer-to-member-function. The result of build_ptrmemfunc (within cp_convert_to_pointer for a null ptr) is a CONSTRUCTOR containing, amongst other things a CAST_EXPR of a