Patch: fix tree check failure in gcj
Tom Tromey
tromey@redhat.com
Sat Dec 8 23:19:00 GMT 2001
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> This code, from Jacks, causes a tree-checking failure in gcj.
Tom> The appended patch fixes this.
Tom> Ok?
Oops, my mistake -- it isn't ok.
Tom> - if (int_fits_type_p (rhs, lhs_type))
Tom> + if (int_fits_type_p (DECL_INITIAL (rhs), lhs_type))
`rhs' isn't always a decl.
Slightly better is to use fold() here, but even that isn't good
enough. It would be nice to use fold_constant_for_init(), but we
aren't necessarily declaring a variable here. Any suggestions?
Tom
More information about the Java-patches
mailing list