]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport 55a7380213a5c16120d5c674fb42b38a3d796b57
authorMartin Liska <mliska@suse.cz>
Fri, 3 Apr 2020 10:33:41 +0000 (12:33 +0200)
committerMartin Liska <mliska@suse.cz>
Fri, 3 Apr 2020 10:33:41 +0000 (12:33 +0200)
Backport from mainline
2020-04-03  Martin Liska  <mliska@suse.cz>

PR ipa/94445
* ipa-icf-gimple.c (func_checker::compare_gimple_call):
  Compare type attributes for gimple_call_fntypes.

gcc/ChangeLog
gcc/ipa-icf-gimple.c

index a64777282a6e30a3c0c78f49a7817ad99e99843f..04e297cd4552cb5aa96c25d54e312f54dead87f4 100644 (file)
@@ -1,3 +1,12 @@
+2020-04-03  Martin Liska  <mliska@suse.cz>
+
+       Backport from mainline
+       2020-04-03  Martin Liska  <mliska@suse.cz>
+
+       PR ipa/94445
+       * ipa-icf-gimple.c (func_checker::compare_gimple_call):
+         Compare type attributes for gimple_call_fntypes.
+
 2020-04-02  Fritz Reese  <foreese@gcc.gnu.org>
 
        Backport from master.
index 25284936bc3532e6ff2d47faf3cc91c0e3a278b1..38e0ac12f7e421f3fc7a2f8be78cb7fef1b84e1f 100644 (file)
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ipa-utils.h"
 #include "tree-eh.h"
 #include "builtins.h"
+#include "attribs.h"
 
 #include "ipa-icf-gimple.h"
 
@@ -768,6 +769,9 @@ func_checker::compare_gimple_call (gcall *s1, gcall *s2)
       || (fntype1 && !types_compatible_p (fntype1, fntype2)))
     return return_false_with_msg ("call function types are not compatible");
 
+  if (fntype1 && fntype2 && comp_type_attributes (fntype1, fntype2) != 1)
+    return return_false_with_msg ("different fntype attributes");
+
   tree chain1 = gimple_call_chain (s1);
   tree chain2 = gimple_call_chain (s2);
   if ((chain1 && !chain2)