https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81174
Bug ID: 81174
Summary: bswap not recognized in |= statement
Product: gcc
Version: 6.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: linux at carewolf dot com
Target Milestone: ---
Created attachment 41610
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41610&action=edit
bswap-issue.cc
In writting a big-endian bitfield accessor I noticed that bswap was not always
recognized.
It appears the problem triggers together with |= statements, at least replacing
the |= statement with += solves the issue.
I have attached a test case. The faulty one is the first, the two second ones
work.