https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103038
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I think this patch which fix the problem: diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 54f91f0149c..2d3ba07e541 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -8791,6 +8791,7 @@ native_interpret_expr (tree type, const unsigned char *ptr, int len) case BOOLEAN_TYPE: case POINTER_TYPE: case REFERENCE_TYPE: + case OFFSET_TYPE: return native_interpret_int (type, ptr, len); case REAL_TYPE: @@ -8827,6 +8828,7 @@ can_native_interpret_type_p (tree type) case REAL_TYPE: case COMPLEX_TYPE: case VECTOR_TYPE: + case OFFSET_TYPE: return true; default: return false; ----------- I have not tested it.