This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PR java/19907: Incorrect code generated for ManifestElement.java
Bryce McKinlay writes:
> Andrew Haley wrote:
>
> >This testcase first allocates a local slot as a boolean and then tries
> >to re-use the same slot as an integer. The confusion is casued by the
> >fact that in the Java VM, stack slots for booleans and integers have
> >the same type. So, when an operation returns a boolean, we should
> >store it in a local of int type. This only applies to the bytecode
> >compiler.
> >
> >This patch changes local variable allocation so that temporaries for
> >values of type boolean are always stored in slots of type int.
> >
> >Andrew.
> >
> >
> >2005-02-11 Andrew Haley <aph@redhat.com>
> >
> > PR java/19907
> > * decl.c (find_local_variable): Promote all boolean types to int
> > when searching for local variable decls.
> >
> >
>
> Cool, thanks for fixing this. This was actually already filed as PR
> 19834, but not to worry.
I searched with every keyword I could think of, but failed! Anyway,
my patch doesn't fix the general case, so I'm doing something better.
Andrew.