public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/c++-coroutines] Always compare types of LHS for gimple_assign in ICF.
@ 2020-02-18 20:44 Iain D Sandoe
0 siblings, 0 replies; only message in thread
From: Iain D Sandoe @ 2020-02-18 20:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:08afe87b7976e93197a66e01f93191ead496ad42
commit 08afe87b7976e93197a66e01f93191ead496ad42
Author: Martin Liska <mliska@suse.cz>
Date: Tue Feb 18 15:07:06 2020 +0100
Always compare types of LHS for gimple_assign in ICF.
PR ipa/92518
* ipa-icf-gimple.c (func_checker::compare_gimple_assign):
Always compare LHS of gimple_assign.
Diff:
---
gcc/ChangeLog | 6 ++++++
gcc/ipa-icf-gimple.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b4b4942..c107f19 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2020-02-18 Martin Liska <mliska@suse.cz>
+ PR ipa/92518
+ * ipa-icf-gimple.c (func_checker::compare_gimple_assign):
+ Always compare LHS of gimple_assign.
+
+2020-02-18 Martin Liska <mliska@suse.cz>
+
PR ipa/93583
* cgraph.c (cgraph_node::verify_node): Verify MALLOC attribute
and return type of functions.
diff --git a/gcc/ipa-icf-gimple.c b/gcc/ipa-icf-gimple.c
index fa71a02..3e5b2d4 100644
--- a/gcc/ipa-icf-gimple.c
+++ b/gcc/ipa-icf-gimple.c
@@ -620,8 +620,8 @@ func_checker::compare_gimple_assign (gimple *s1, gimple *s2)
arg1 = gimple_op (s1, i);
arg2 = gimple_op (s2, i);
- /* LHS types of NOP_EXPR must be compatible. */
- if (CONVERT_EXPR_CODE_P (code1) && i == 0)
+ /* Compare types for LHS. */
+ if (i == 0)
{
if (!compatible_types_p (TREE_TYPE (arg1), TREE_TYPE (arg2)))
return return_false_with_msg ("GIMPLE NOP LHS type mismatch");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-18 20:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 20:44 [gcc/devel/c++-coroutines] Always compare types of LHS for gimple_assign in ICF Iain D Sandoe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).