Commit 5cd0a74a by Michael Meissner Committed by Michael Meissner

stor-layout.c (layout_type): Move setting complex MODE to layout_type...

[gcc]
2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* stor-layout.c (layout_type): Move setting complex MODE to
	layout_type, instead of setting it ahead of time by the caller.
	* tree.c (build_complex_type): Likewise.

[gcc/fortran]
2016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* trans-types.c (gfc_build_complex_type): Move setting complex
	MODE to layout_type, instead of setting it ahead of time by the
	caller.

From-SVN: r237657
parent 63617e30
2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
* stor-layout.c (layout_type): Move setting complex MODE to
layout_type, instead of setting it ahead of time by the caller.
* tree.c (build_complex_type): Likewise.
2016-06-21 Martin Liska <mliska@suse.cz> 2016-06-21 Martin Liska <mliska@suse.cz>
* predict.c (force_edge_cold): Replace imposisble with * predict.c (force_edge_cold): Replace imposisble with
......
2016-06-21 Michael Meissner <meissner@linux.vnet.ibm.com>
* trans-types.c (gfc_build_complex_type): Move setting complex
MODE to layout_type, instead of setting it ahead of time by the
caller.
2016-06-21 Tobias Burnus <burnus@net-b.de> 2016-06-21 Tobias Burnus <burnus@net-b.de>
PR fortran/71068 PR fortran/71068
......
...@@ -828,7 +828,6 @@ gfc_build_complex_type (tree scalar_type) ...@@ -828,7 +828,6 @@ gfc_build_complex_type (tree scalar_type)
new_type = make_node (COMPLEX_TYPE); new_type = make_node (COMPLEX_TYPE);
TREE_TYPE (new_type) = scalar_type; TREE_TYPE (new_type) = scalar_type;
SET_TYPE_MODE (new_type, GET_MODE_COMPLEX_MODE (TYPE_MODE (scalar_type)));
layout_type (new_type); layout_type (new_type);
return new_type; return new_type;
} }
......
...@@ -2146,12 +2146,8 @@ layout_type (tree type) ...@@ -2146,12 +2146,8 @@ layout_type (tree type)
case COMPLEX_TYPE: case COMPLEX_TYPE:
TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type));
SET_TYPE_MODE (type,
/* build_complex_type and fortran's gfc_build_complex_type have set the GET_MODE_COMPLEX_MODE (TYPE_MODE (TREE_TYPE (type))));
expected mode to allow having multiple complex types for multiple
floating point types that have the same size such as the PowerPC with
__ibm128 and __float128. */
gcc_assert (TYPE_MODE (type) != VOIDmode);
TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type))); TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type)));
TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type))); TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type)));
......
...@@ -8783,7 +8783,6 @@ build_complex_type (tree component_type) ...@@ -8783,7 +8783,6 @@ build_complex_type (tree component_type)
t = make_node (COMPLEX_TYPE); t = make_node (COMPLEX_TYPE);
TREE_TYPE (t) = TYPE_MAIN_VARIANT (component_type); TREE_TYPE (t) = TYPE_MAIN_VARIANT (component_type);
SET_TYPE_MODE (t, GET_MODE_COMPLEX_MODE (TYPE_MODE (component_type)));
/* If we already have such a type, use the old one. */ /* If we already have such a type, use the old one. */
hstate.add_object (TYPE_HASH (component_type)); hstate.add_object (TYPE_HASH (component_type));
......
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