* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
@ 2011-03-03 9:11 ` jakub at gcc dot gnu.org
2011-03-03 10:13 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-03 9:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-03 09:11:43 UTC ---
You need to provide self-contained testcase, this is not self-contained.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
2011-03-03 9:11 ` [Bug c++/47964] " jakub at gcc dot gnu.org
@ 2011-03-03 10:13 ` rguenth at gcc dot gnu.org
2011-03-03 10:17 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-03 10:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011.03.03 10:13:18
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-03 10:13:18 UTC ---
Self-contained as in, compilable and runnable and showing the failure.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
2011-03-03 9:11 ` [Bug c++/47964] " jakub at gcc dot gnu.org
2011-03-03 10:13 ` rguenth at gcc dot gnu.org
@ 2011-03-03 10:17 ` jakub at gcc dot gnu.org
2011-03-03 18:26 ` rob.bob.301 at hotmail dot com
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-03 10:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-03 10:17:45 UTC ---
bool foo (unsigned int a0)
{
return a0 < 1000001U || ~a0 < 1000001U;
}
int
main ()
{
__builtin_printf ("%d\n", (int) foo (1));
}
certainly prints one, not 0.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
` (2 preceding siblings ...)
2011-03-03 10:17 ` jakub at gcc dot gnu.org
@ 2011-03-03 18:26 ` rob.bob.301 at hotmail dot com
2011-03-03 19:04 ` manu at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rob.bob.301 at hotmail dot com @ 2011-03-03 18:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
--- Comment #4 from rob.bob.301 at hotmail dot com 2011-03-03 18:26:00 UTC ---
(In reply to comment #1)
> You need to provide self-contained testcase, this is not self-contained.
Thank you for running your simple experiment. Unfortunately, all my attempts to
create a simple self-contained test have failed. Of course, during this
process, I did play with exactly the same code you did.
I have been aware of this problem for several months. I decided to file a bug
without a test because the problem appears to be critical and I hope somebody
who knows the optimization code might spot the issue.
All I can add is that my project is about 110k lines of code, the function in
question is in a .cpp file of about 560 lines. But I doubt it helps very much.
S.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
` (3 preceding siblings ...)
2011-03-03 18:26 ` rob.bob.301 at hotmail dot com
@ 2011-03-03 19:04 ` manu at gcc dot gnu.org
2011-03-05 21:28 ` rob.bob.301 at hotmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: manu at gcc dot gnu.org @ 2011-03-03 19:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |manu at gcc dot gnu.org
--- Comment #5 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-03-03 19:03:47 UTC ---
(In reply to comment #4)
> Unfortunately, all my attempts to
> create a simple self-contained test have failed. Of course, during this
The advice here may help you:
http://gcc.gnu.org/bugs/minimize.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
` (4 preceding siblings ...)
2011-03-03 19:04 ` manu at gcc dot gnu.org
@ 2011-03-05 21:28 ` rob.bob.301 at hotmail dot com
2011-03-29 17:00 ` redi at gcc dot gnu.org
2011-09-23 21:33 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: rob.bob.301 at hotmail dot com @ 2011-03-05 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
--- Comment #6 from rob.bob.301 at hotmail dot com 2011-03-05 21:28:26 UTC ---
This bug is not present in
gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
` (5 preceding siblings ...)
2011-03-05 21:28 ` rob.bob.301 at hotmail dot com
@ 2011-03-29 17:00 ` redi at gcc dot gnu.org
2011-09-23 21:33 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2011-03-29 17:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-29 16:51:47 UTC ---
Is this still present on the 4.5 branch, or later releases?
(In reply to comment #4)
> (In reply to comment #1)
> > You need to provide self-contained testcase, this is not self-contained.
>
> Thank you for running your simple experiment. Unfortunately, all my attempts to
> create a simple self-contained test have failed.
It doesn't necessarily have to be simple (although that's preferable) but
without a testcase of some kind this will not get looked at.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/47964] logical || returns false result, optimization level 02 or 03
2011-03-03 8:40 [Bug c++/47964] New: logical || returns false result, optimization level 02 or 03 rob.bob.301 at hotmail dot com
` (6 preceding siblings ...)
2011-03-29 17:00 ` redi at gcc dot gnu.org
@ 2011-09-23 21:33 ` paolo.carlini at oracle dot com
7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-23 21:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47964
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-23 21:31:24 UTC ---
Feedback not forthcoming.
^ permalink raw reply [flat|nested] 9+ messages in thread