[PATCH][C++] Fix libjava breakage on darwin, PR35035

Andrew Haley aph@redhat.com
Thu Jan 31 18:46:00 GMT 2008


Richard Guenther wrote:
> On Thu, 31 Jan 2008, Richard Guenther wrote:
> 
>> The following patch un-breaks the java ABI on darwin by not making
>> jboolean the same as bool, but unconditionally use QImode while still
>> retaining the fix to make jboolean have boolean semantics.  To
>> not make changes all over the place in the C++ frontend to support
>> two distinct boolean types we still link both types via their
>> main variant and canonical types and thus only retain the difference
>> during structure layout and at expansion time.  Hopefully at least.
> 
> Ok, seems that it doesn't.  As reported by Andreas, this fails
> building libjava with
> 
> /Volumes/development/gcc/head/gcc/libjava/jni.cc:470: internal compiler 
> error:
> in emit_move_insn, at expr.c:3379
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> 
> Now, I'm not too eager to revert the original patch as we will
> have jboolean behave in strange ways.  We could apply the
> reversion conditional on TYPE_MODE (boolean_type_node) !=
> smallest_mode_for_size (1, MODE_INT), but to make language behavior
> dependent on the target ABI may be even worse(?)

I'm not madly happy about that idea, but it might be the least worst way
to keep everything running for 4.3.

Andrew.



More information about the Gcc-patches mailing list