[Bug c++/79118] [7 Regression] internal compiler error: in cxx_eval_bit_field_ref, at cp/constexpr.c:2258
s_gccbugzilla at nedprod dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 19 09:35:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79118
--- Comment #8 from Niall Douglas <s_gccbugzilla at nedprod dot com> ---
(In reply to Marek Polacek from comment #7)
> I'm giving up; there's just too much C++.
Thanks for looking into it. You should know that the above code works without
issue on clang and VS2017 (with C++ 14 constexpr enabled too!).
In your reduced test case I don't think you're packing the storage and the type
of storage into a single byte. That's what the original does, and appears to be
the cause of the ICE on GCC: use of bitfields in constexpr. It certainly should
not be the case that the constexpr is accessing storage not initialised by
constexpr e.g. a bit 8 when valid bits are 0 ... 7.
Niall
More information about the Gcc-bugs
mailing list