summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-06-07 13:01:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-06-07 13:01:27 +0000
commit009db074870ccdf44bafc9d3f604246ddb80974b (patch)
treecbb46e504142fe46fdb3be5ff672c24a8d0d2cd1 /gcc/java
parentb4592b92ac97f5573c08b16d115c89d3b8157c39 (diff)
downloadgcc-009db074870ccdf44bafc9d3f604246ddb80974b.tar.gz
tree.c (build_common_tree_nodes): Also initialize size_type_node.
2011-06-07 Richard Guenther <rguenther@suse.de> * tree.c (build_common_tree_nodes): Also initialize size_type_node. Call set_sizetype from here. c-family/ * c-common.c (c_common_nodes_and_builtins): Do not set size_type_node or call set_sizetype. go/ * go-lang.c (go_langhook_init): Do not set size_type_node or call set_sizetype. fortran/ * f95-lang.c (gfc_init_decl_processing): Do not set size_type_node or call set_sizetype. java/ * decl.c (java_init_decl_processing): Properly initialize size_type_node. lto/ * lto-lang.c (lto_init): Do not set size_type_node or call set_sizetype. ada/ * gcc-interface/misc.c (gnat_init): Do not set size_type_node or call set_sizetype. From-SVN: r174743
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog5
-rw-r--r--gcc/java/decl.c9
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 1e50bc86e6c..b29e9c29f00 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-07 Richard Guenther <rguenther@suse.de>
+
+ * decl.c (java_init_decl_processing): Properly initialize
+ size_type_node.
+
2011-05-30 Joern Rennecke <joern.rennecke@embecosm.com>
PR middle-end/46500
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index e9581368088..0ee23742a16 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -606,7 +606,14 @@ java_init_decl_processing (void)
/* This is not a java type, however tree-dfa requires a definition for
size_type_node. */
- size_type_node = make_unsigned_type (POINTER_SIZE);
+ if (strcmp (SIZE_TYPE, "unsigned int") == 0)
+ size_type_node = make_unsigned_type (INT_TYPE_SIZE);
+ else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
+ size_type_node = make_unsigned_type (LONG_TYPE_SIZE);
+ else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
+ size_type_node = make_unsigned_type (LONG_LONG_TYPE_SIZE);
+ else
+ gcc_unreachable ();
set_sizetype (size_type_node);
/* Define these next since types below may used them. */