https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106764
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Actually the fix is just check the return value of gimplify_expr to make sure
it was not GS_ERROR.
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index f06ce3cc77a..9b74f957308 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -3709,6 +3709,9 @@ gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool
want_value)
ret = gimplify_expr (&CALL_EXPR_FN (*expr_p), pre_p, NULL,
is_gimple_call_addr, fb_rvalue);
+ if (ret == GS_ERROR)
+ return GS_ERROR;
+
nargs = call_expr_nargs (*expr_p);
/* Get argument types for verification. */