[Bug tree-optimization/103038] ICE in set_mem_attributes_minus_bitpos, at emit-rtl.c:2092 since r12-4829-g429e3b7d8bf6609d
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Nov 2 08:51:35 GMT 2021
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.
More information about the Gcc-bugs
mailing list