[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 we

[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 == boost::asio::er

[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 expressions,

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

2016-02-12 Thread tmark at isc dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69789 --- Comment #1 from Thomas Markwalder --- Created attachment 37676 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37676&action=edit compressed compilation temp file

[Bug rtl-optimization/69789] New: g++ -O2 is removing tests against a variable that can be changed

2016-02-12 Thread tmark at isc dot org
Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: tmark at isc dot org Target Milestone: --- Our Kea project uses boost::asio. When compiled with gcc 5.3.1 and -O2, the optimizer is incorrectly removing tests against a