This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Cleanup handling of variants in ipa-devirt
- From: Bernhard Reutner-Fischer <rep dot dot dot nop at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org,Jan Hubicka <hubicka at ucw dot cz>
- Date: Fri, 26 Oct 2018 18:28:04 +0200
- Subject: Re: Cleanup handling of variants in ipa-devirt
- References: <20181026071839.GC42273@kam.mff.cuni.cz>
On 26 October 2018 09:18:39 CEST, Jan Hubicka <hubicka@ucw.cz> wrote:
@@ -1094,10 +1133,15 @@ warn_types_mismatch (tree t1, tree t2, l
gcc_assert (TYPE_NAME (t1) && TYPE_NAME (t2)
&& TREE_CODE (TYPE_NAME (t1)) == TYPE_DECL
&& TREE_CODE (TYPE_NAME (t2)) == TYPE_DECL);
+ tree n1 = TYPE_NAME (t1);
+ tree n2 = TYPE_NAME (t2);
+ if (TREE_CODE (n1) == TYPE_DECL)
+ n1 = DECL_NAME (n1);
+ if (TREE_CODE (n2) == TYPE_DECL)
+ n1 = DECL_NAME (n2);
/* Most of the time, the type names will match, do not be unnecesarily
verbose. */
Typo?
Please explain why you don't set n2 but overwrite n1?
thanks,