[Bug java/27025] ICE on simple initializer
aph at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 5 14:12:00 GMT 2006
------- Comment #6 from aph at gcc dot gnu dot org 2006-04-05 14:12 -------
As far as I can see this bug is in every version of gcj that has ever existed.
There is special code (in merge_string_cste()) to convert an integer constant
to a constant string for concatenation. However, there isn't any code to
convert a floating-point constant to a constant string.
It would be fairly simple to call real_to_decimal() on the floating-point
number, but that function doesn't do Java-style floating-point formatting. We
could add full Java-style floating-point output conversion to gcj, but I don't
think it would be worth the effort.
My proposed fix, although technically imperfect, cures 99% of the cases we are
ever likely to encounter. It fails to fix weird cases like:
switch(x) { case 0: break;
case ("foo" + 2) == "foo2": break;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27025
More information about the Gcc-bugs
mailing list