Commit 009db074 by Richard Guenther Committed by Richard Biener

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
parent b4592b92
2011-06-07 Richard Guenther <rguenther@suse.de>
* tree.c (build_common_tree_nodes): Also initialize size_type_node.
Call set_sizetype from here.
2011-06-07 Andrew Stubbs <ams@codesourcery.com>
* config/arm/arm.md (*maddhidi4tb, *maddhidi4tt): New define_insns.
......
2011-06-07 Richard Guenther <rguenther@suse.de>
* gcc-interface/misc.c (gnat_init): Do not set
size_type_node or call set_sizetype.
2011-06-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_stabilize_reference): Propagate
......
......@@ -309,17 +309,6 @@ gnat_init (void)
matter since we'll use the explicit `unsigned char' for Character. */
build_common_tree_nodes (flag_signed_char);
/* In Ada, we use the unsigned type corresponding to the width of Pmode as
SIZETYPE. In most cases when ptr_mode and Pmode differ, C will use the
width of ptr_mode for SIZETYPE, but we get better code using the width
of Pmode. Note that, although we manipulate negative offsets for some
internal constructs and rely on compile time overflow detection in size
computations, using unsigned types for SIZETYPEs is fine since they are
treated specially by the middle-end, in particular sign-extended. */
size_type_node = gnat_type_for_mode (Pmode, 1);
set_sizetype (size_type_node);
TYPE_NAME (sizetype) = get_identifier ("size_type");
/* In Ada, we use an unsigned 8-bit type for the default boolean type. */
boolean_type_node = make_unsigned_type (8);
TREE_SET_CODE (boolean_type_node, BOOLEAN_TYPE);
......
2011-06-07 Richard Guenther <rguenther@suse.de>
* c-common.c (c_common_nodes_and_builtins): Do not set
size_type_node or call set_sizetype.
2011-06-07 Dodji Seketeli <dodji@redhat.com>
PR debug/49130
......
......@@ -4666,13 +4666,7 @@ c_common_nodes_and_builtins (void)
TYPE_DECL, NULL_TREE,
widest_unsigned_literal_type_node));
/* `unsigned long' is the standard type for sizeof.
Note that stddef.h uses `unsigned long',
and this must agree, even if long and int are the same size. */
size_type_node =
TREE_TYPE (identifier_global_value (get_identifier (SIZE_TYPE)));
signed_size_type_node = c_common_signed_type (size_type_node);
set_sizetype (size_type_node);
pid_type_node =
TREE_TYPE (identifier_global_value (get_identifier (PID_TYPE)));
......
2011-06-07 Richard Guenther <rguenther@suse.de>
* f95-lang.c (gfc_init_decl_processing): Do not set
size_type_node or call set_sizetype.
2011-06-05 Tobias Burnus <burnus@net-b.de>
PR fortran/49255
......
......@@ -590,9 +590,6 @@ gfc_init_decl_processing (void)
want double_type_node to actually have double precision. */
build_common_tree_nodes (false);
size_type_node = gfc_build_uint_type (POINTER_SIZE);
set_sizetype (size_type_node);
build_common_tree_nodes_2 (0);
void_list_node = build_tree_list (NULL_TREE, void_type_node);
......
2011-06-07 Richard Guenther <rguenther@suse.de>
* go-lang.c (go_langhook_init): Do not set
size_type_node or call set_sizetype.
2011-05-27 Ian Lance Taylor <iant@google.com>
* go-backend.c: Include "output.h".
......
......@@ -87,15 +87,6 @@ go_langhook_init (void)
{
build_common_tree_nodes (false);
/* The sizetype may be "unsigned long" or "unsigned long long". */
if (TYPE_MODE (long_unsigned_type_node) == ptr_mode)
size_type_node = long_unsigned_type_node;
else if (TYPE_MODE (long_long_unsigned_type_node) == ptr_mode)
size_type_node = long_long_unsigned_type_node;
else
size_type_node = long_unsigned_type_node;
set_sizetype (size_type_node);
build_common_tree_nodes_2 (0);
/* We must create the gogo IR after calling build_common_tree_nodes
......
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
......
......@@ -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. */
......
2011-06-07 Richard Guenther <rguenther@suse.de>
* lto-lang.c (lto_init): Do not set
size_type_node or call set_sizetype.
2011-06-04 Diego Novillo <dnovillo@google.com>
* lto.c (lto_init): New.
......
......@@ -1087,17 +1087,6 @@ lto_init (void)
/* Create the basic integer types. */
build_common_tree_nodes (flag_signed_char);
/* Tell the middle end what type to use for the size of objects. */
if (strcmp (SIZE_TYPE, "unsigned int") == 0)
size_type_node = unsigned_type_node;
else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
size_type_node = long_unsigned_type_node;
else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
size_type_node = long_long_unsigned_type_node;
else
gcc_unreachable ();
set_sizetype (size_type_node);
/* The global tree for the main identifier is filled in by
language-specific front-end initialization that is not run in the
LTO back-end. It appears that all languages that perform such
......
......@@ -9142,6 +9142,7 @@ build_common_tree_nodes (bool signed_char)
int128_unsigned_type_node = make_unsigned_type (128);
}
#endif
/* Define a boolean type. This type only represents boolean values but
may be larger than char depending on the value of BOOL_TYPE_SIZE.
Front ends which want to override this size (i.e. Java) can redefine
......@@ -9151,6 +9152,17 @@ build_common_tree_nodes (bool signed_char)
TYPE_MAX_VALUE (boolean_type_node) = build_int_cst (boolean_type_node, 1);
TYPE_PRECISION (boolean_type_node) = 1;
/* Define what type to use for size_t. */
if (strcmp (SIZE_TYPE, "unsigned int") == 0)
size_type_node = unsigned_type_node;
else if (strcmp (SIZE_TYPE, "long unsigned int") == 0)
size_type_node = long_unsigned_type_node;
else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
size_type_node = long_long_unsigned_type_node;
else
gcc_unreachable ();
set_sizetype (size_type_node);
/* Fill in the rest of the sized types. Reuse existing type nodes
when possible. */
intQI_type_node = make_or_reuse_type (GET_MODE_BITSIZE (QImode), 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment