aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-19 18:06:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-05-19 18:06:46 +0000
commitf819300fa7aa71a14efc86080d08d8e9db6192fb (patch)
treeb195215f578b93632639dbfc49cb3bb32959a384 /gcc
parentcb4c41dd4d9b0cf349e9c51c23492113dea975a6 (diff)
downloadgcc-f819300fa7aa71a14efc86080d08d8e9db6192fb.zip
gcc-f819300fa7aa71a14efc86080d08d8e9db6192fb.tar.gz
gcc-f819300fa7aa71a14efc86080d08d8e9db6192fb.tar.bz2
stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P.
* stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P. (layout_type): Use RECORD_OR_UNION_TYPE_P. From-SVN: r223407
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stor-layout.c13
2 files changed, 9 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9676e38..d692d06 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * stor-layout.c (finalize_type_size): Use AGGREGATE_TYPE_P.
+ (layout_type): Use RECORD_OR_UNION_TYPE_P.
+
2015-05-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_vector_bool_type_p): New function.
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 006ec5d..82997dd 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -1757,12 +1757,9 @@ finalize_type_size (tree type)
However, where strict alignment is not required, avoid
over-aligning structures, since most compilers do not do this
alignment. */
-
- if (TYPE_MODE (type) != BLKmode && TYPE_MODE (type) != VOIDmode
- && (STRICT_ALIGNMENT
- || (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE
- && TREE_CODE (type) != QUAL_UNION_TYPE
- && TREE_CODE (type) != ARRAY_TYPE)))
+ if (TYPE_MODE (type) != BLKmode
+ && TYPE_MODE (type) != VOIDmode
+ && (STRICT_ALIGNMENT || !AGGREGATE_TYPE_P (type)))
{
unsigned mode_align = GET_MODE_ALIGNMENT (TYPE_MODE (type));
@@ -2431,9 +2428,7 @@ layout_type (tree type)
/* Compute the final TYPE_SIZE, TYPE_ALIGN, etc. for TYPE. For
records and unions, finish_record_layout already called this
function. */
- if (TREE_CODE (type) != RECORD_TYPE
- && TREE_CODE (type) != UNION_TYPE
- && TREE_CODE (type) != QUAL_UNION_TYPE)
+ if (!RECORD_OR_UNION_TYPE_P (type))
finalize_type_size (type);
/* We should never see alias sets on incomplete aggregates. And we