https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116865
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if ((code == MINUS_EXPR || code == PLUS_EXPR || code == MULT_EXPR)
&& arg0 && arg1 && tt && POINTER_TYPE_P (tt)
/* When sizetype precision doesn't match that of pointers
we need to be able to build explicit extensions or truncations
of the offset argument. */
&& TYPE_PRECISION (sizetype) == TYPE_PRECISION (tt))
gcc_assert (TREE_CODE (arg0) == INTEGER_CST
&& TREE_CODE (arg1) == INTEGER_CST);
That means we are using a pointer type with PLUS/MINUS/MULT which is invalid
AST/IR for generic . Let me try to reduce it.