This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix ICE in get_memory_rtx
> > - && TYPE_SIZE_UNIT (TREE_TYPE (inner))
> > - && host_integerp (TYPE_SIZE_UNIT (TREE_TYPE (inner)), 0))
> > + && host_integerp (DECL_SIZE_UNIT (field), 0))
> > {
> > HOST_WIDE_INT size
> > - = tree_low_cst (TYPE_SIZE_UNIT (TREE_TYPE (inner)), 0);
> > + = TREE_INT_CST_LOW (DECL_SIZE_UNIT (field));
>
> Why change from tree_low_cst to TREE_INT_CST_LOW? Shouldn't the only
> change here be from TYPE_SIZE_UNIT to DECL_SIZE_UNIT?
It's indeed not required, but I personally avoid writing
if (host_integerp (t, 0))
... = tree_low_cst (t, 0);
since it's totally redundant. Not sure what the policy wrt tree_low_cst vs
TREE_INT_CST_LOW is though (if any).
--
Eric Botcazou