public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
@ 2015-03-11 10:41 maksqwe1 at ukr dot net
2015-03-11 10:44 ` [Bug tree-optimization/65388] " mpolacek at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: maksqwe1 at ukr dot net @ 2015-03-11 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
Bug ID: 65388
Summary: Wrong comparison in same_succ_def::equal()
tree-ssa-tail-merge.c:590
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: maksqwe1 at ukr dot net
tree-ssa-tail-merge.c:590
same_succ_def::equal()
if (!inverse_flags (e1, e2))
{
for (i = 0; i < e1->succ_flags.length (); ++i)
=== > if (e1->succ_flags[i] != e1->succ_flags[i])
return 0;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
@ 2015-03-11 10:44 ` mpolacek at gcc dot gnu.org
2015-03-11 10:45 ` mpolacek at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-11 10:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
That looks indeed. The code is in mainline as well and I bet 4.8 has it too.
Patch:
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -587,7 +587,7 @@ same_succ_def::equal (const value_type *e1, const
compare_type *e2)
if (!inverse_flags (e1, e2))
{
for (i = 0; i < e1->succ_flags.length (); ++i)
- if (e1->succ_flags[i] != e1->succ_flags[i])
+ if (e1->succ_flags[i] != e2->succ_flags[i])
return 0;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
2015-03-11 10:44 ` [Bug tree-optimization/65388] " mpolacek at gcc dot gnu.org
@ 2015-03-11 10:45 ` mpolacek at gcc dot gnu.org
2015-03-11 10:56 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-11 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #1)
> That looks indeed.
I meant weird.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
2015-03-11 10:44 ` [Bug tree-optimization/65388] " mpolacek at gcc dot gnu.org
2015-03-11 10:45 ` mpolacek at gcc dot gnu.org
@ 2015-03-11 10:56 ` jakub at gcc dot gnu.org
2015-03-11 10:58 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-11 10:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Do we warn in this case (something like condition is always false)?
clang has -Wtautological-compare warning that warns say for
int b;
if (b != b)
but doesn't already for
int a[10], i;
if (a[i] != a[i]).
gcc has -Wtype-limits, which partially overlaps the -Wtautological-compare, so
if we introduce it, we should probably just add there the cases not already
covered by -Wtype-limits.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
` (2 preceding siblings ...)
2015-03-11 10:56 ` jakub at gcc dot gnu.org
@ 2015-03-11 10:58 ` jakub at gcc dot gnu.org
2015-03-11 11:05 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-03-11 10:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ah, we have PR54979 for that already...
Marek, would you be interested to look at this in stage1?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
` (3 preceding siblings ...)
2015-03-11 10:58 ` jakub at gcc dot gnu.org
@ 2015-03-11 11:05 ` mpolacek at gcc dot gnu.org
2015-03-12 11:11 ` mpolacek at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-11 11:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-03-11
Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Ah, we have PR54979 for that already...
> Marek, would you be interested to look at this in stage1?
Yes, I am; we should be able to warn in such egregious cases. Similar issues:
PR64249, PR63357.
Taking this one...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
` (4 preceding siblings ...)
2015-03-11 11:05 ` mpolacek at gcc dot gnu.org
@ 2015-03-12 11:11 ` mpolacek at gcc dot gnu.org
2015-03-12 11:27 ` mpolacek at gcc dot gnu.org
2015-03-12 11:29 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-12 11:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
` (5 preceding siblings ...)
2015-03-12 11:11 ` mpolacek at gcc dot gnu.org
@ 2015-03-12 11:27 ` mpolacek at gcc dot gnu.org
2015-03-12 11:29 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-12 11:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Mar 12 08:34:00 2015
New Revision: 221376
URL: https://gcc.gnu.org/viewcvs?rev=221376&root=gcc&view=rev
Log:
PR tree-optimization/65388
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Mar 12 08:31:36 2015
New Revision: 221375
URL: https://gcc.gnu.org/viewcvs?rev=221375&root=gcc&view=rev
Log:
PR tree-optimization/65388
* tree-ssa-tail-merge.c (same_succ_def::equal): Fix typo in comparison.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/tree-ssa-tail-merge.c
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/65388] Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
` (6 preceding siblings ...)
2015-03-12 11:27 ` mpolacek at gcc dot gnu.org
@ 2015-03-12 11:29 ` mpolacek at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-12 11:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65388
--- Comment #8 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Mar 12 08:34:00 2015
New Revision: 221376
URL: https://gcc.gnu.org/viewcvs?rev=221376&root=gcc&view=rev
Log:
PR tree-optimization/65388
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/tree-ssa-tail-merge.c
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu Mar 12 08:31:36 2015
New Revision: 221375
URL: https://gcc.gnu.org/viewcvs?rev=221375&root=gcc&view=rev
Log:
PR tree-optimization/65388
* tree-ssa-tail-merge.c (same_succ_def::equal): Fix typo in comparison.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/tree-ssa-tail-merge.c
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-03-12 11:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 10:41 [Bug tree-optimization/65388] New: Wrong comparison in same_succ_def::equal() tree-ssa-tail-merge.c:590 maksqwe1 at ukr dot net
2015-03-11 10:44 ` [Bug tree-optimization/65388] " mpolacek at gcc dot gnu.org
2015-03-11 10:45 ` mpolacek at gcc dot gnu.org
2015-03-11 10:56 ` jakub at gcc dot gnu.org
2015-03-11 10:58 ` jakub at gcc dot gnu.org
2015-03-11 11:05 ` mpolacek at gcc dot gnu.org
2015-03-12 11:11 ` mpolacek at gcc dot gnu.org
2015-03-12 11:27 ` mpolacek at gcc dot gnu.org
2015-03-12 11:29 ` mpolacek at gcc dot gnu.org
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).