This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: fix tree check failure in gcj
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Cc: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Date: 09 Dec 2001 00:22:57 -0700
- Subject: Re: Patch: fix tree check failure in gcj
- References: <87667g99y7.fsf@creche.redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "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