diff options
author | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-21 20:57:20 +0000 |
---|---|---|
committer | meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-06-21 20:57:20 +0000 |
commit | f4b7151e076140e125616e10effd9b96e36d341f (patch) | |
tree | 41ee0d0c5c8d5d26bbfceeb26f4a7e72a26d8d10 | |
parent | 1cb2b4d307d9fe57b55a8e059811b9f998991259 (diff) | |
download | gcc-f4b7151e076140e125616e10effd9b96e36d341f.tar.gz |
[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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@237657 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-types.c | 1 | ||||
-rw-r--r-- | gcc/stor-layout.c | 8 | ||||
-rw-r--r-- | gcc/tree.c | 1 |
5 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06179d1f748..627de2bfdcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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> * predict.c (force_edge_cold): Replace imposisble with diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 317fee5b6be..9b4b957b109 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +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> PR fortran/71068 diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 0f4172522f1..bde64f499c7 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -828,7 +828,6 @@ gfc_build_complex_type (tree scalar_type) new_type = make_node (COMPLEX_TYPE); TREE_TYPE (new_type) = scalar_type; - SET_TYPE_MODE (new_type, GET_MODE_COMPLEX_MODE (TYPE_MODE (scalar_type))); layout_type (new_type); return new_type; } diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index bf8a978c062..40170efb33f 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -2146,12 +2146,8 @@ layout_type (tree type) case COMPLEX_TYPE: TYPE_UNSIGNED (type) = TYPE_UNSIGNED (TREE_TYPE (type)); - - /* build_complex_type and fortran's gfc_build_complex_type have set the - 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); + SET_TYPE_MODE (type, + GET_MODE_COMPLEX_MODE (TYPE_MODE (TREE_TYPE (type)))); TYPE_SIZE (type) = bitsize_int (GET_MODE_BITSIZE (TYPE_MODE (type))); TYPE_SIZE_UNIT (type) = size_int (GET_MODE_SIZE (TYPE_MODE (type))); diff --git a/gcc/tree.c b/gcc/tree.c index fd0e6921bfd..58c663a8220 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -8783,7 +8783,6 @@ build_complex_type (tree component_type) t = make_node (COMPLEX_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. */ hstate.add_object (TYPE_HASH (component_type)); |