OSDN Git Service

2008-02-04 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2008 21:12:49 +0000 (21:12 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 4 Feb 2008 21:12:49 +0000 (21:12 +0000)
PR java/35035
* decl.c (record_builtin_java_type): Make jboolean a
integer type again where its mode doesn't match that of bool.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132095 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index 3504769..0cd642b 100644 (file)
@@ -1,3 +1,9 @@
+2008-02-04  Richard Guenther  <rguenther@suse.de>
+
+       PR java/35035
+       * decl.c (record_builtin_java_type): Make jboolean a
+       integer type again where its mode doesn't match that of bool.
+
 2008-02-02  Jason Merrill  <jason@redhat.com>
            Mark Mitchell  <mark@codesourcery.com>
 
index 93baa7d..8150f79 100644 (file)
@@ -3161,7 +3161,13 @@ record_builtin_java_type (const char* name, int size)
     type = make_signed_type (size);
   else if (size == -1)
     { /* "__java_boolean".  */
-      type = build_variant_type_copy (boolean_type_node);
+      if ((TYPE_MODE (boolean_type_node)
+          == smallest_mode_for_size (1, MODE_INT)))
+        type = build_variant_type_copy (boolean_type_node);
+      else
+       /* ppc-darwin has SImode bool, make jboolean a 1-bit
+          integer type without boolean semantics there.  */
+       type = make_unsigned_type (1);
     }
   else if (size > -32)
     { /* "__java_char".  */