aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2016-06-21 21:34:12 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-06-21 21:34:12 +0000
commitd42b75599229d4a0e36fddae2931feff40ae7c03 (patch)
treee7b0e434edc72f983800394d5804a843fe014a03 /gcc/tree.c
parent5cd0a74a915cbd63653a8332c2a54c13bb33fbf4 (diff)
downloadgcc-d42b75599229d4a0e36fddae2931feff40ae7c03.zip
gcc-d42b75599229d4a0e36fddae2931feff40ae7c03.tar.gz
gcc-d42b75599229d4a0e36fddae2931feff40ae7c03.tar.bz2
tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if they are both PLACEHOLDER_EXPRs.
* tree.c (verify_type_variant): Skip TYPE_SIZE and TYPE_SIZE_UNIT if they are both PLACEHOLDER_EXPRs. ada/ * gcc-interface/decl.c (set_nonaliased_component_on_array_type): New function. (set_reverse_storage_order_on_array_type): Likewise. (gnat_to_gnu_entity) <E_Array_Type>: Call them to set the flags. <E_Array_Subtype>: Likewise. <E_String_Literal_Subtype>: Likewise. (substitute_in_type) <ARRAY_TYPE>: Likewise. * gcc-interface/utils.c (gnat_pushdecl): Always create a variant for the DECL_ORIGINAL_TYPE of a type. From-SVN: r237658
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 58c663a..bc60190 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13220,9 +13220,13 @@ verify_type_variant (const_tree t, tree tv)
if (COMPLETE_TYPE_P (t))
{
- verify_variant_match (TYPE_SIZE);
verify_variant_match (TYPE_MODE);
- if (TYPE_SIZE_UNIT (t) != TYPE_SIZE_UNIT (tv)
+ if (TREE_CODE (TYPE_SIZE (t)) != PLACEHOLDER_EXPR
+ && TREE_CODE (TYPE_SIZE (tv)) != PLACEHOLDER_EXPR)
+ verify_variant_match (TYPE_SIZE);
+ if (TREE_CODE (TYPE_SIZE_UNIT (t)) != PLACEHOLDER_EXPR
+ && TREE_CODE (TYPE_SIZE_UNIT (tv)) != PLACEHOLDER_EXPR
+ && TYPE_SIZE_UNIT (t) != TYPE_SIZE_UNIT (tv)
/* FIXME: ideally we should compare pointer equality, but java FE
produce variants where size is INTEGER_CST of different type (int
wrt size_type) during libjava biuld. */