[Bug c++/50115] New: Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 Bug #: 50115 Summary: Integer test optimised away at -O2 by the VRP Classification: Unclassified Product: gcc Version: 4.5.1 Status: UNCONFIRMED Severity: major Prior

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #1 from Balint Szente 2011-08-18 09:56:54 UTC --- Created attachment 25048 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25048 Suse's G++ exact version and other info

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #2 from Balint Szente 2011-08-18 09:57:34 UTC --- Created attachment 25049 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25049 Preprocessed file with Arch Linux's GCC 4.6.0

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #3 from Balint Szente 2011-08-18 09:58:24 UTC --- Created attachment 25050 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25050 Arch Linux's G++ exact version and other info

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #5 from Balint Szente 2011-08-18 11:13:08 UTC --- Yes. Is G++'s VRP considering that "value" will be always positive, and for this reason will never be equal to ::min()?

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #7 from Balint Szente 2011-08-18 11:59:59 UTC --- Thanks for your prompt reply. I understand that my test case is undefined behavior from the C/C++ standard's perspective. I disregarded that it is not allowed to make any overflows. U

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #8 from Balint Szente 2011-08-18 12:44:53 UTC --- Just for the record, for clarifying this for me and other people... There are two statements in C++ standard: * Chapter 5 "If during the evaluation of an expression, the result is not

[Bug c++/50115] Integer test optimised away at -O2 by the VRP

2011-08-18 Thread balint at szentedwg dot ro
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50115 --- Comment #11 from Balint Szente 2011-08-18 13:20:18 UTC --- Thanks for the explanation and for your time.