This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [PR c++/33887] Fix incorrect use of jboolean in link.cc
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Alexandre Oliva" <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Fri, 18 Jan 2008 21:19:36 +0100
- Subject: Re: [PR c++/33887] Fix incorrect use of jboolean in link.cc
- References: <ork5m7t0g3.fsf@oliva.athome.lsd.ic.unicamp.br>
2008/1/18 Alexandre Oliva <aoliva@redhat.com>:
> We've been lucky for a while, because C++ doesn't reduce types
> narrower than registers to their native width after every operation,
> or ever. This enabled jboolean to behave like an unsigned byte,
> rather than like a single bit, in the use in link.cc.
>
> As we experimented transitioning C++ to a reduce-after-every-operation
> mode, as a possible fix for PR c++/33887, this thinko in libjava got
> exposed, because, with the change, the jboolean gets truncated to a
> single bit. So, when a superclass has an even number of interfaces,
> it remains unchanged, and when two superclasses both have odd numbers
> of interfaces, they cancel out. Oops.
>
> Fixed with the patch below, that Tom Tromey pre-approved. I'll check
> it in as soon as my re-testing is completed.
Jikes! Thanks for tracking this down!
Richard.