Hello, I recently stumbled upon the ICE described in bug 122658 in my code and have been trying to fix with no success (mostly because I have no gcc development experience).
The ICE seems to happen when tsubst_expr is called with a TARGET_EXPR tree, that's not handled by the switch so it goes into the default case and ICEs. Before 3e3d73ed5e85 that introduced this bug, it seems that this was not failing because tsubst_expr (at the time tsubst_copy_and_build)'s default case was calling tsubst_copy that then returned early in case of a null args tree, but now tsubst_expr just ICEs in case of an unhandled tree code. I've been trying to find a proper way to handle this with no success, does anyone have any tips? Would the right way be to add a switch case for TARGET_EXPR? Or is there something else I'm missing? Thanks and sorry if there's some trivial fix I've missed.
