https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63851

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Yes, IPA ICF should respect 'restrict' attribute.
May I ask you to rerun test suite with applied:

diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index ec0290a..98f38ee 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -185,6 +185,9 @@ bool func_checker::compatible_types_p (tree t1, tree t2,
   if (TREE_CODE (t1) != TREE_CODE (t2))
     return return_false_with_msg ("different tree types");

+  if (TYPE_RESTRICT (t1) != TYPE_RESTRICT (t2))
+    return return_false_with_msg ("restrict flags are different");
+
   if (!types_compatible_p (t1, t2))
     return return_false_with_msg ("types are not compatible");

Thanks,
Martin

Reply via email to