Hi Richard,
> > Technically, could a backend define a __builtin_xxx and expands it to
> > a CONST_INT?
>
> Yes, it could. But I think I don't care. If optimization is on,
> it'll get cleaned up later. And the target does have the option
> of the fold_builtin target hook to make this happen earlier.
I'll submit a new patch that has both
gcc_assert (TREE_CODE (index_expr) != INTEGER_CST);
gcc_assert (GET_CODE (index) != CONST_INT);
as a friendly reminder to a backend. :-)
Kazu Hirata