This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cleanup handling of variants in ipa-devirt


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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]