[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-08-23 Thread tmark at isc dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #8 from Thomas Markwalder --- (In reply to Jonathan Wakely from comment #7) > (In reply to Thomas Markwalder from comment #5) > > A bit more digging reveals that in the logic expression which fails: > > > > {{{ > > // Check if

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-08-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #7 from Jonathan Wakely --- (In reply to Thomas Markwalder from comment #5) > A bit more digging reveals that in the logic expression which fails: > > {{{ > // Check if we need to run the operation again. > if (ec ==

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-08-19 Thread spam.gcc at klub dot com.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 Tomek Mrugalski changed: What|Removed |Added CC||spam.gcc at klub dot com.pl ---

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-03-15 Thread tmark at isc dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #5 from Thomas Markwalder --- A bit more digging reveals that in the logic expression which fails: {{{ // Check if we need to run the operation again. if (ec == boost::asio::error::would_block || ec ==

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-02-26 Thread thomson at klub dot com.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 Tomek Mrugalski changed: What|Removed |Added CC||thomson at klub dot com.pl ---

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-02-23 Thread tmark at isc dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #3 from Thomas Markwalder --- After further analysis we've discovered that the optimizer does not remove the tests, it alters the comparison of (ec == enumerated value). If one replaces the "ec" with "ec.value()" in the

[Bug target/69789] g++ -O2 is removing tests against a variable that can be changed

2016-02-12 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #2 from Andrew Pinski --- This works in GCC 6 on aarch64 as far as I can tell.