On 1/14/19 3:15 PM, Marek Polacek wrote:
On Mon, Jan 14, 2019 at 03:06:33PM -0500, Jason Merrill wrote:
On 1/13/19 9:11 PM, Marek Polacek wrote:
In this (invalid) testcase the return type deduction failed so FUNCTYPE was
error_mark_node and can_do_nrvo_p crashed. One way to fix this would be to
check error_operand_p as below.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2019-01-13 Marek Polacek <pola...@redhat.com>
PR c++/88825 - ICE with bogus function return type deduction.
* typeck.c (can_do_nrvo_p): Check error_operand_p.
error_operand_p also checks TREE_TYPE of its operand, is that useful here
instead of only comparing functype to error_mark_node?
Actually, it isn't. So we can get away with a simple comparison, as in the
below:
Bootstrapped/regtested on x86_64-linux, ok for trunk?
OK.
Jason