aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-05-04 10:26:43 -0400
committerMarek Polacek <polacek@redhat.com>2020-05-04 10:35:24 -0400
commit05be85b649173b10d0bf10255eb15275c2dcf509 (patch)
tree62c616ef6bf58a7e256f7ea98a0107f0b54d9b91 /gcc/tree.c
parent367766f40a031ff064857681dc4da3309f0ce57d (diff)
downloadgcc-05be85b649173b10d0bf10255eb15275c2dcf509.zip
gcc-05be85b649173b10d0bf10255eb15275c2dcf509.tar.gz
gcc-05be85b649173b10d0bf10255eb15275c2dcf509.tar.bz2
Revert "tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]"
This reverts commit 6318fe77395fc0dd59419bc4d69cd06ac0158e54. Revert: 2020-04-30 Marek Polacek <polacek@redhat.com> PR c++/94775 * tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match. (check_aligned_type): Check if TYPE_USER_ALIGN match.
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 341766c..e451401 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -6493,8 +6493,7 @@ check_base_type (const_tree cand, const_tree base)
TYPE_ATTRIBUTES (base)))
return false;
/* Check alignment. */
- if (TYPE_ALIGN (cand) == TYPE_ALIGN (base)
- && TYPE_USER_ALIGN (cand) == TYPE_USER_ALIGN (base))
+ if (TYPE_ALIGN (cand) == TYPE_ALIGN (base))
return true;
/* Atomic types increase minimal alignment. We must to do so as well
or we get duplicated canonical types. See PR88686. */
@@ -6529,7 +6528,6 @@ check_aligned_type (const_tree cand, const_tree base, unsigned int align)
&& TYPE_CONTEXT (cand) == TYPE_CONTEXT (base)
/* Check alignment. */
&& TYPE_ALIGN (cand) == align
- && TYPE_USER_ALIGN (cand) == TYPE_USER_ALIGN (base)
&& attribute_list_equal (TYPE_ATTRIBUTES (cand),
TYPE_ATTRIBUTES (base))
&& check_lang_type (cand, base));