[PATCH] Remove TYPE_IS_SIZETYPE
Eric Botcazou
ebotcazou@adacore.com
Thu May 10 16:10:00 GMT 2012
> For example
>
> Index: stor-layout.c
> ===================================================================
> --- stor-layout.c (revision 187364)
> +++ stor-layout.c (working copy)
> @@ -791,6 +791,10 @@ start_record_layout (tree t)
> tree
> bit_from_pos (tree offset, tree bitpos)
> {
> + if (TREE_CODE (offset) == PLUS_EXPR)
> + offset = size_binop (PLUS_EXPR,
> + fold_convert (bitsizetype, TREE_OPERAND (offset, 0)),
> + fold_convert (bitsizetype, TREE_OPERAND (offset, 1)));
> return size_binop (PLUS_EXPR, bitpos,
> size_binop (MULT_EXPR,
> fold_convert (bitsizetype, offset),
>
> fixes the specific testcase you provided.
I get a bootstrap failure on x86 (verify_flow_info failed) with it. Let's drop
it for now, we'll revisit this later.
> I suppose if stor-layout.c would
> be more carefully handle advancing offset/bitpos, avoding repeated
> translations between them, those issues would not exist. Of course the
> mere existence of DECL_OFFSET_ALIGN complicates matters for no good reasons
> (well, at least I did not find a good use of it until now ...).
Maybe it's also obsolete by now.
--
Eric Botcazou
More information about the Gcc-patches
mailing list