[Bug middle-end/55851] [4.8 Regression] ICE in size_binop_loc, at fold-const.c:1385
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 3 14:48:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55851
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Component|c |middle-end
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-03 14:47:37 UTC ---
The C FE is innocent, it has TYPE_SIZE_UNIT <nop_expr sizetype <something>>.
The problem is in the gimplifier, gimplify_one_sizepos, because sizetype is
types_compatible_p with the ENUMERAL_TYPE (with -m32), replaces the sizetype
typed TYPE_SIZE_UNIT with the enumeral one. So, either we'd need to special
case this in gimplify_one_sizepos or so and if it turns an INTEGER_TYPE expr
into something with different type TREE_CODE, do something (what exactly? If
we turn it into a NOP_EXPR of the VAR_DECL, it will not satisfy
is_gimple_sizepos and we'll try to regimplify it again and again, or shall we
adjust is_gimple_sizepos too to allow that special case of a NOP_EXPR of
is_gimple_sizepos if the types are compatible?). Or adjust whatever code is
assuming that TYPE_SIZE_UNIT must be INTEGER_TYPE.
More information about the Gcc-bugs
mailing list