public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/46274] New: testsuite/gcc.dg: operator precedence
@ 2010-11-02 17:41 nikai at nikai dot net
2010-11-03 10:56 ` [Bug testsuite/46274] " rguenth at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: nikai at nikai dot net @ 2010-11-02 17:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46274
Summary: testsuite/gcc.dg: operator precedence
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: nikai@nikai.net
The below tests appear not to work as intended because they
seem to always pass due to operator precedence (== and !=
before &, ^, |).
---
diff -u -p a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c 2010-10-29
11:08:43.273700439 +0200
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c 2010-11-02
18:20:05.501608310 +0100
@@ -30,7 +30,7 @@ int main ()
/* check results: */
for (i = 0; i < N; i++)
{
- if (ia[i] != ib[i] & ic[i])
+ if (ia[i] != (ib[i] & ic[i]))
abort ();
}
diff -u -p a/gcc/testsuite/gcc.dg/vect/vect-19.c
b/gcc/testsuite/gcc.dg/vect/vect-19.c
--- a/gcc/testsuite/gcc.dg/vect/vect-19.c 2010-10-29 11:08:53.205318077 +0200
+++ b/gcc/testsuite/gcc.dg/vect/vect-19.c 2010-11-02 18:20:12.075658468 +0100
@@ -81,7 +81,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (ia[i] != ib[i] ^ ic[i])
+ if (ia[i] != (ib[i] ^ ic[i]))
abort ();
}
@@ -95,7 +95,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (ca[i] != cb[i] ^ cc[i])
+ if (ca[i] != (cb[i] ^ cc[i]))
abort ();
}
@@ -109,7 +109,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (sa[i] != sb[i] ^ sc[i])
+ if (sa[i] != (sb[i] ^ sc[i]))
abort ();
}
diff -u -p a/gcc/testsuite/gcc.dg/vect/vect-17.c
b/gcc/testsuite/gcc.dg/vect/vect-17.c
--- a/gcc/testsuite/gcc.dg/vect/vect-17.c 2010-10-29 11:08:53.075296903 +0200
+++ b/gcc/testsuite/gcc.dg/vect/vect-17.c 2010-11-02 18:20:13.955863347 +0100
@@ -82,7 +82,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (ia[i] != ib[i] & ic[i])
+ if (ia[i] != (ib[i] & ic[i]))
abort ();
}
@@ -96,7 +96,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (ca[i] != cb[i] & cc[i])
+ if (ca[i] != (cb[i] & cc[i]))
abort ();
}
@@ -110,7 +110,7 @@ main1 ()
/* check results: */
for (i = 0; i <N; i++)
{
- if (sa[i] != sb[i] & sc[i])
+ if (sa[i] != (sb[i] & sc[i]))
abort ();
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/46274] testsuite/gcc.dg: operator precedence
2010-11-02 17:41 [Bug testsuite/46274] New: testsuite/gcc.dg: operator precedence nikai at nikai dot net
@ 2010-11-03 10:56 ` rguenth at gcc dot gnu.org
2010-11-03 13:16 ` rguenth at gcc dot gnu.org
2010-11-03 13:33 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 10:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46274
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.11.03 10:55:53
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-03 10:55:53 UTC ---
Mine.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/46274] testsuite/gcc.dg: operator precedence
2010-11-02 17:41 [Bug testsuite/46274] New: testsuite/gcc.dg: operator precedence nikai at nikai dot net
2010-11-03 10:56 ` [Bug testsuite/46274] " rguenth at gcc dot gnu.org
@ 2010-11-03 13:16 ` rguenth at gcc dot gnu.org
2010-11-03 13:33 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 13:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46274
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-03 13:16:05 UTC ---
Author: rguenth
Date: Wed Nov 3 13:16:02 2010
New Revision: 166243
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166243
Log:
2010-11-03 Richard Guenther <rguenther@suse.de>
PR testsuite/46274
* gcc.dg/tree-ssa/gen-vect-11a.c: Fix operator precedence.
* gcc.dg/vect/vect-19.c: Likewise.
* gcc.dg/vect/vect-17.c: Likewise.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
trunk/gcc/testsuite/gcc.dg/vect/vect-17.c
trunk/gcc/testsuite/gcc.dg/vect/vect-19.c
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug testsuite/46274] testsuite/gcc.dg: operator precedence
2010-11-02 17:41 [Bug testsuite/46274] New: testsuite/gcc.dg: operator precedence nikai at nikai dot net
2010-11-03 10:56 ` [Bug testsuite/46274] " rguenth at gcc dot gnu.org
2010-11-03 13:16 ` rguenth at gcc dot gnu.org
@ 2010-11-03 13:33 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 13:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46274
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.6.0
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-03 13:33:21 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-03 13:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02 17:41 [Bug testsuite/46274] New: testsuite/gcc.dg: operator precedence nikai at nikai dot net
2010-11-03 10:56 ` [Bug testsuite/46274] " rguenth at gcc dot gnu.org
2010-11-03 13:16 ` rguenth at gcc dot gnu.org
2010-11-03 13:33 ` rguenth 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).