diff mbox

Remove a FIXME from verify_type_variant

Message ID 20161104165347.gigf2rtr5vnmuqdl@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor Nov. 4, 2016, 4:53 p.m. UTC
Hi,

now that we removed java, let us check whether the FIXME this removes
(and that was added by Honza) is actually true.  It only affects
checking runs and if it turns out to be false, we can easily revert
this.

Bootstrapped, LTO-bootstrapped and tested on x86_64-linux and
aarch64-linux, OK for trunk?

Thanks,

Martin



2016-11-03  Martin Jambor  <mjambor@suse.cz>

	* tree.c (verify_type_variant): Use pointer comparison to check that
	TYPE_SIZE_UNIT match.
---
 gcc/tree.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Comments

Jeff Law Nov. 5, 2016, 2:31 a.m. UTC | #1
On 11/04/2016 10:53 AM, Martin Jambor wrote:
> Hi,
>
> now that we removed java, let us check whether the FIXME this removes
> (and that was added by Honza) is actually true.  It only affects
> checking runs and if it turns out to be false, we can easily revert
> this.
>
> Bootstrapped, LTO-bootstrapped and tested on x86_64-linux and
> aarch64-linux, OK for trunk?
>
> Thanks,
>
> Martin
>
>
>
> 2016-11-03  Martin Jambor  <mjambor@suse.cz>
>
> 	* tree.c (verify_type_variant): Use pointer comparison to check that
> 	TYPE_SIZE_UNIT match.
LGTM.

jeff
diff mbox

Patch

diff --git a/gcc/tree.c b/gcc/tree.c
index 56cc653..10fc70d 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13272,12 +13272,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");