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(?)