[Bug c/106560] ICE after conflicting types of redeclaration
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 8 15:56:15 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106560
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2022-08-08
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is the simple fix, I will submit it this weekend.
[apinski@xeond2 gcc]$ git diff
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index f0fbdb48012..d9ada8e0f9e 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -6012,6 +6012,11 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p,
gimple_seq *post_p,
gcc_assert (TREE_CODE (*expr_p) == MODIFY_EXPR
|| TREE_CODE (*expr_p) == INIT_EXPR);
+ if (TREE_TYPE (*from_p) == error_mark_node)
+ return GS_ERROR;
+ if (TREE_TYPE (*to_p) == error_mark_node)
+ return GS_ERROR;
+
/* Trying to simplify a clobber using normal logic doesn't work,
so handle it here. */
if (TREE_CLOBBER_P (*from_p))
More information about the Gcc-bugs
mailing list