https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95579
Bug ID: 95579 Summary: internal compiler error: in sign_mask, at wide-int.h:855 Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nmmm at nmmm dot nu Target Milestone: --- https://gcc.godbolt.org/z/5Dfous #include <cstdint> uint16_t byteswap(uint16_t const a){ constexpr uint8_t b[] = { 8 * (2 - 1) }; auto const x = (0x00ffULL & a) << b[0] | (0xff00ULL & a) >> b[0] ; return static_cast<uint16_t>(x); } ------------------ <source>: In function 'uint16_t byteswap(uint16_t)': <source>:12:25: internal compiler error: in sign_mask, at wide-int.h:855 12 | (0xff00ULL & a) >> b[0] | ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://gcc.gnu.org/bugs/> for instructions. Compiler returned: 1