Make Wodr warnings stable.

Message ID 4270de02-0d8e-6a86-3c07-212a2d0e62be@suse.cz
State New
Headers show
Series
  • Make Wodr warnings stable.
Related show

Commit Message

Martin Liška April 18, 2018, 7:57 p.m.
Hi.

This is small series that fixes 2 Wodr warnings issue that we have in bugzilla.
It should make in stable across targets, I've tested x86_64, ppc64le and aarch64.

Patch can bootstrap on x86_64-linux-gnu and ppc64le-linux-gnu. It's pre-approved
by Honza who worked on that with me. I'm going to install it.

Thanks,
Martin

Patch

From da91962666663c7b0a22acd0ad0b5848323d306a Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 16 Apr 2018 13:33:29 +0200
Subject: [PATCH 1/4] Revert r25841.

gcc/ChangeLog:

2018-04-16  Martin Liska  <mliska@suse.cz>

	Revert
	2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>

	PR lto/84805
	* ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
	incomplete types.
---
 gcc/ipa-devirt.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index bdda7d6b4a9..bec0c01ea09 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -690,8 +690,6 @@  odr_subtypes_equivalent_p (tree t1, tree t2,
 	 therefore which call will report the ODR violation, if any.  */
 	 if (!odr_type_p (t1)
 	     || !odr_type_p (t2)
-	     || !COMPLETE_TYPE_P (t1)
-	     || !COMPLETE_TYPE_P (t2)
 	     || (!get_odr_type (t1, true)->odr_violated
 		 && !get_odr_type (t2, true)->odr_violated))
         return true;
-- 
2.16.3