From f73fbf900d484b5d37b7432f21db84e5bf1efd75 Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Mon, 7 Nov 2016 19:30:26 +0100 Subject: [PATCH] Remove a TODO from verify_type_variant 2016-11-07 Martin Jambor * tree.c (verify_type_variant): Use pointer comparison to check that TYPE_SIZE_UNIT match. From-SVN: r241918 --- gcc/ChangeLog | 5 +++++ gcc/tree.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba5386e0d25..86f59118327 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-11-07 Martin Jambor + + * tree.c (verify_type_variant): Use pointer comparison to check that + TYPE_SIZE_UNIT match. + 2016-11-07 Jakub Jelinek PR target/77834 diff --git a/gcc/tree.c b/gcc/tree.c index 434aff1c4ee..c155d56d2c5 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -13289,12 +13289,10 @@ verify_type_variant (const_tree t, tree tv) 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. */ - && !operand_equal_p (TYPE_SIZE_UNIT (t), TYPE_SIZE_UNIT (tv), 0)) + && TYPE_SIZE_UNIT (t) != TYPE_SIZE_UNIT (tv)) { + gcc_assert (!operand_equal_p (TYPE_SIZE_UNIT (t), + TYPE_SIZE_UNIT (tv), 0)); error ("type variant has different TYPE_SIZE_UNIT"); debug_tree (tv); error ("type variant's TYPE_SIZE_UNIT"); -- 2.30.2