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