https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110682

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This fixes the ICE:
```
[apinski@xeond2 gcc]$ git diff
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index 6ebca964cb2..0f43324fb35 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -17681,7 +17681,11 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p,
gimple_seq *post_p,
       save_expr = *expr_p;

       /* Die, die, die, my darling.  */
-      if (error_operand_p (save_expr))
+      if (error_operand_p (save_expr)
+         /* The above strip useless type conversion might not strip out
+            a conversion from an error so handle that case here.  */
+         || (TREE_CODE (save_expr) == NON_LVALUE_EXPR
+             && error_operand_p (TREE_OPERAND (save_expr, 0))))
        {
          ret = GS_ERROR;
          break;

```

I will submit it tomorrow once I test it fully.

Reply via email to