From 009db074870ccdf44bafc9d3f604246ddb80974b Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Tue, 7 Jun 2011 13:01:27 +0000 Subject: tree.c (build_common_tree_nodes): Also initialize size_type_node. 2011-06-07 Richard Guenther * 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 --- gcc/java/ChangeLog | 5 +++++ gcc/java/decl.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'gcc/java') 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 + + * decl.c (java_init_decl_processing): Properly initialize + size_type_node. + 2011-05-30 Joern Rennecke 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. */ -- cgit v1.2.1