Re: [PATCH] c++: Fix tsubst ICE with invalid static_cast [PR95728]

2020-06-17 Thread Jason Merrill via Gcc-patches
On 6/17/20 8:10 PM, Marek Polacek wrote: Since r11-423 tsubst_copy_and_build/TREE_LIST uses tsubst_tree_list instead of open coding it. While the latter could return an error node wrapped in a TREE_LIST, the former can return a naked error node. That broke in tsubst_copy_and_build/NEW_EXPR:

[PATCH] c++: Fix tsubst ICE with invalid static_cast [PR95728]

2020-06-17 Thread Marek Polacek via Gcc-patches
Since r11-423 tsubst_copy_and_build/TREE_LIST uses tsubst_tree_list instead of open coding it. While the latter could return an error node wrapped in a TREE_LIST, the former can return a naked error node. That broke in tsubst_copy_and_build/NEW_EXPR: tree placement = RECUR (TREE_OPERAND (t, 0))