[Bug middle-end/55851] [4.8 Regression] ICE in size_binop_loc, at fold-const.c:1385
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 3 16:32:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55851
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> 2013-01-03 16:32:04 UTC ---
Ehm. (In reply to comment #8)
> Created attachment 29078 [details]
> gcc48-pr55851.patch
>
> Untested patch (which I don't like very much, but we can't even use something
> like get_initialized_tmp_var which would strip the cast as useless too).
Ugh. Now that sizetypes are no longer "special" we can also decide to
allow ENUMERAL_TYPE in size positions (and adjust int_binop_types_match_p).
But I'm not sure if we really want non-literal-sizetype sizes in type
trees (they will easily appear in the extra operands of ARRAY_REF and
COMPONENT_REF though, so maybe it's really the right thing to do).
Otherwise using a get_initialized_tmp_var-like mechanism should be ok
as long as you explicitely create the temporary variable with sizetype
(I don't see that it strips the cast before getting at the type to
create the temporary?)
More information about the Gcc-bugs
mailing list