gnu/gcc/ba972b2b2ecdbe22ab2132fa7f696a8b037bbb77 gccrs: Fix ICE in get_function_expr when cfg'd return type inside macro
the problem is cfg-strip emits an error for unstrippable expressions but
doesn't mark the parent for strip, leaving a broken subtree for later
passes to ICE on.
gcc/rust/ChangeLog:
* expand/rust-cfg-strip.cc (CfgStrip::visit): mark CallExpr for
strip when function expression fails stripping.
(CfgStrip::visit): mark ArrayIndexExpr for strip when array or
index expression fails stripping.
gcc/testsuite/ChangeLog:
* rust/compile/issue-4167.rs: New test.
Signed-off-by: Harishankar <harishankarpp7@gmail.com>
2 files changed