public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix typo in index comporasion of CONSTRUCTOR.
@ 2019-05-31 14:38 Martin Liška
  2019-06-03 10:38 ` Richard Biener
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2019-05-31 14:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: Richard Biener

[-- Attachment #1: Type: text/plain, Size: 451 bytes --]

Hi.

I've been working on an overhaul of IPA ICF and I noticed that issue.

Looks to me obvious.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2019-05-31  Martin Liska  <mliska@suse.cz>

	* fold-const.c (operand_equal_p): Fix typo as compare_tree_int
	returns 0 when operands are equal.
---
 gcc/fold-const.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[-- Attachment #2: 0001-Fix-typo-in-index-comporasion-of-CONSTRUCTOR.patch --]
[-- Type: text/x-patch, Size: 615 bytes --]

diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 42289013cc1..3e066a2ecc4 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -3508,10 +3508,10 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
 		     positives for GENERIC.  */
 		  || (c0->index
 		      && (TREE_CODE (c0->index) != INTEGER_CST 
-			  || !compare_tree_int (c0->index, i)))
+			  || compare_tree_int (c0->index, i)))
 		  || (c1->index
 		      && (TREE_CODE (c1->index) != INTEGER_CST 
-			  || !compare_tree_int (c1->index, i))))
+			  || compare_tree_int (c1->index, i))))
 		return 0;
 	    }
 	  return 1;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix typo in index comporasion of CONSTRUCTOR.
  2019-05-31 14:38 [PATCH] Fix typo in index comporasion of CONSTRUCTOR Martin Liška
@ 2019-06-03 10:38 ` Richard Biener
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2019-06-03 10:38 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Fri, May 31, 2019 at 3:43 PM Martin Liška <mliska@suse.cz> wrote:
>
> Hi.
>
> I've been working on an overhaul of IPA ICF and I noticed that issue.
>
> Looks to me obvious.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?

OK.

Richard.

> Thanks,
> Martin
>
> gcc/ChangeLog:
>
> 2019-05-31  Martin Liska  <mliska@suse.cz>
>
>         * fold-const.c (operand_equal_p): Fix typo as compare_tree_int
>         returns 0 when operands are equal.
> ---
>  gcc/fold-const.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-03 10:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 14:38 [PATCH] Fix typo in index comporasion of CONSTRUCTOR Martin Liška
2019-06-03 10:38 ` Richard Biener

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).