https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107994
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- This should fix the issue (have not tested it yet): diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc index 02415cb1b5c..ae13f9fd9e6 100644 --- a/gcc/gimplify.cc +++ b/gcc/gimplify.cc @@ -17098,6 +17098,9 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, memcmp for them would be very inefficient at best, and is plain wrong if bitfields are involved. */ { + if (error_operand_p (TREE_OPERAND (*expr_p, 1)) + return GS_ERROR; + tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 1)); /* Vector comparisons need no boolification. */