aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorMichael Meissner <meissner@linux.vnet.ibm.com>2016-06-21 20:57:20 +0000
committerMichael Meissner <meissner@gcc.gnu.org>2016-06-21 20:57:20 +0000
commit5cd0a74a915cbd63653a8332c2a54c13bb33fbf4 (patch)
tree41ee0d0c5c8d5d26bbfceeb26f4a7e72a26d8d10 /gcc/stor-layout.c
parent63617e30150f174ffa325057327c16483715aa09 (diff)
downloadgcc-5cd0a74a915cbd63653a8332c2a54c13bb33fbf4.zip
gcc-5cd0a74a915cbd63653a8332c2a54c13bb33fbf4.tar.gz
gcc-5cd0a74a915cbd63653a8332c2a54c13bb33fbf4.tar.bz2
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
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index bf8a978..40170ef 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)));