In this PR we are ICEing here: bool operation_no_trapping_overflow (tree type, enum tree_code code) { gcc_checking_assert (ANY_INTEGRAL_TYPE_P (type));
...because we are being passed a pointer type from find_trapping_overflow. Fixed by avoiding passing non-integrals from find_trapping_overflow. Pre-approved by Jakub. Committed. Tested on x86-64 Linux.
gcc/ PR tree-optimization/84225 * tree-eh.c (find_trapping_overflow): Only call operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P. diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 75385f7b53f..9862ed9fdda 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2729,6 +2729,7 @@ static tree find_trapping_overflow (tree *tp, int *walk_subtrees, void *data) { if (EXPR_P (*tp) + && ANY_INTEGRAL_TYPE_P (TREE_TYPE (*tp)) && !operation_no_trapping_overflow (TREE_TYPE (*tp), TREE_CODE (*tp))) return *tp; if (IS_TYPE_OR_DECL_P (*tp)