summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 13:01:27 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 13:01:27 +0000
commit1af0124d4d6507b50437fb30c19b9d4aab6f3779 (patch)
treecbb46e504142fe46fdb3be5ff672c24a8d0d2cd1 /gcc/java
parent0e9a4c0161a49fa966841cb4dcbfbc4f63eeb4bb (diff)
downloadgcc-1af0124d4d6507b50437fb30c19b9d4aab6f3779.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174743 138bc75d-0d04-0410-961f-82ee72b054a4
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. */