* [PATCH] Fix PR ipa/65282
@ 2015-03-03 10:41 Martin Liška
2015-03-03 11:35 ` Richard Biener
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Martin Liška @ 2015-03-03 10:41 UTC (permalink / raw)
To: GCC Patches; +Cc: hubi >> Jan Hubicka
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Hello.
There's suggested patch for the issue, where regression test have been running on x86_64-linux-pc.
Ready for trunk after tests will be finished?
Thanks,
Martin
[-- Attachment #2: 0001-Fix-PR-ipa-65282.patch --]
[-- Type: text/x-patch, Size: 1671 bytes --]
From a186fc97c5f192b94cc571f611a50eb0f4f8a354 Mon Sep 17 00:00:00 2001
From: mliska <mliska@suse.cz>
Date: Tue, 3 Mar 2015 11:33:30 +0100
Subject: [PATCH] Fix PR ipa/65282.
gcc/testsuite/ChangeLog:
2015-03-03 Martin Liska <mliska@suse.cz>
* gcc.dg/ipa/PR65282.c: New test.
gcc/ChangeLog:
2015-03-03 Martin Liska <mliska@suse.cz>
PR ipa/65282
* ipa-icf.c (sem_variable::equals): Fix wrong condition.
---
gcc/ipa-icf.c | 2 +-
gcc/testsuite/gcc.dg/ipa/PR65282.c | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.dg/ipa/PR65282.c
diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 14ccea5..08ee979 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -1638,7 +1638,7 @@ sem_variable::equals (tree t1, tree t2)
tree y1 = TREE_OPERAND (t1, 1);
tree y2 = TREE_OPERAND (t2, 1);
- if (!sem_variable::equals (x1, x2) && sem_variable::equals (y1, y2))
+ if (!sem_variable::equals (x1, x2) || !sem_variable::equals (y1, y2))
return false;
if (!sem_variable::equals (array_ref_low_bound (t1),
array_ref_low_bound (t2)))
diff --git a/gcc/testsuite/gcc.dg/ipa/PR65282.c b/gcc/testsuite/gcc.dg/ipa/PR65282.c
new file mode 100644
index 0000000..58e1c55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/PR65282.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -fdump-ipa-icf" } */
+
+int a[2];
+static int *b = &a[0], *c = &a[1];
+
+int
+main ()
+{
+ *c = 1;
+ *b = 0;
+
+ if (a[1] != 1)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "Equal symbols: 0" "icf" } } */
+/* { dg-final { cleanup-ipa-dump "icf" } } */
--
2.1.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix PR ipa/65282
2015-03-03 10:41 [PATCH] Fix PR ipa/65282 Martin Liška
@ 2015-03-03 11:35 ` Richard Biener
2015-03-03 17:20 ` Jan Hubicka
2015-03-03 17:27 ` Jan Hubicka
2 siblings, 0 replies; 4+ messages in thread
From: Richard Biener @ 2015-03-03 11:35 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches, hubi >> Jan Hubicka
On Tue, Mar 3, 2015 at 11:40 AM, Martin Liška <mliska@suse.cz> wrote:
> Hello.
>
> There's suggested patch for the issue, where regression test have been
> running on x86_64-linux-pc.
>
> Ready for trunk after tests will be finished?
Ok.
Thanks,
Richard.
> Thanks,
> Martin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix PR ipa/65282
2015-03-03 10:41 [PATCH] Fix PR ipa/65282 Martin Liška
2015-03-03 11:35 ` Richard Biener
@ 2015-03-03 17:20 ` Jan Hubicka
2015-03-03 17:27 ` Jan Hubicka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Hubicka @ 2015-03-03 17:20 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches, hubi >> Jan Hubicka
> Hello.
>
> There's suggested patch for the issue, where regression test have been running on x86_64-linux-pc.
>
> Ready for trunk after tests will be finished?
> Thanks,
> Martin
> >From a186fc97c5f192b94cc571f611a50eb0f4f8a354 Mon Sep 17 00:00:00 2001
> From: mliska <mliska@suse.cz>
> Date: Tue, 3 Mar 2015 11:33:30 +0100
> Subject: [PATCH] Fix PR ipa/65282.
>
> gcc/testsuite/ChangeLog:
>
> 2015-03-03 Martin Liska <mliska@suse.cz>
>
> * gcc.dg/ipa/PR65282.c: New test.
>
> gcc/ChangeLog:
>
> 2015-03-03 Martin Liska <mliska@suse.cz>
>
> PR ipa/65282
> * ipa-icf.c (sem_variable::equals): Fix wrong condition.
OK.
Honza
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix PR ipa/65282
2015-03-03 10:41 [PATCH] Fix PR ipa/65282 Martin Liška
2015-03-03 11:35 ` Richard Biener
2015-03-03 17:20 ` Jan Hubicka
@ 2015-03-03 17:27 ` Jan Hubicka
2 siblings, 0 replies; 4+ messages in thread
From: Jan Hubicka @ 2015-03-03 17:27 UTC (permalink / raw)
To: Martin Liška; +Cc: GCC Patches, hubi >> Jan Hubicka
> Hello.
>
> There's suggested patch for the issue, where regression test have been running on x86_64-linux-pc.
>
> Ready for trunk after tests will be finished?
> Thanks,
> Martin
> >From a186fc97c5f192b94cc571f611a50eb0f4f8a354 Mon Sep 17 00:00:00 2001
> From: mliska <mliska@suse.cz>
> Date: Tue, 3 Mar 2015 11:33:30 +0100
> Subject: [PATCH] Fix PR ipa/65282.
>
> gcc/testsuite/ChangeLog:
>
> 2015-03-03 Martin Liska <mliska@suse.cz>
>
> * gcc.dg/ipa/PR65282.c: New test.
>
> gcc/ChangeLog:
>
> 2015-03-03 Martin Liska <mliska@suse.cz>
>
> PR ipa/65282
> * ipa-icf.c (sem_variable::equals): Fix wrong condition.
OK,
Honza
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-03 17:27 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 10:41 [PATCH] Fix PR ipa/65282 Martin Liška
2015-03-03 11:35 ` Richard Biener
2015-03-03 17:20 ` Jan Hubicka
2015-03-03 17:27 ` Jan Hubicka
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).