diff options
author | Martin Liska <mliska@suse.cz> | 2020-04-03 09:05:06 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-04-03 09:05:06 +0200 |
commit | 55a7380213a5c16120d5c674fb42b38a3d796b57 (patch) | |
tree | 2b9bb9c44863168d6c44589faac5ff24dc87746d /gcc | |
parent | b749b5ec58acd1da57f2afabac732027e8a88755 (diff) | |
download | gcc-55a7380213a5c16120d5c674fb42b38a3d796b57.zip gcc-55a7380213a5c16120d5c674fb42b38a3d796b57.tar.gz gcc-55a7380213a5c16120d5c674fb42b38a3d796b57.tar.bz2 |
ICF: compare type attributes for gimple_call_fntypes.
PR ipa/94445
* ipa-icf-gimple.c (func_checker::compare_gimple_call):
Compare type attributes for gimple_call_fntypes.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ipa-icf-gimple.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8c57cd5..3087c58 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 Sandra Loosemore <sandra@codesourcery.com> * alias.c (get_alias_set): Fix comment typos. diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c index d306fec..1cd5872 100644 --- a/gcc/ipa-icf-gimple.c +++ b/gcc/ipa-icf-gimple.c @@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-eh.h" #include "builtins.h" #include "cfgloop.h" +#include "attribs.h" #include "ipa-icf-gimple.h" @@ -570,6 +571,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) |