https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113783
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ugh, folding turns this into
uint256_t D.3758;
<bb 2> :
D.3758 = MEM <uint256_t> [(char * {ref-all})&x];
MEM <uint256_t> [(char * {ref-all})p] = D.3758;
and later ssa turns it into
uint256_t _2;
<bb 2> :
_2 = VIEW_CONVERT_EXPR<uint256_t>(x_1(D));
MEM <uint256_t> [(char * {ref-all})p_4(D)] = _2;
where presumably uint256_t is some 256-bit unsigned INTEGER_TYPE.
Except it isn't really supported except perhaps for moves.
Similarly
void
bar (void *p, _BitInt(502) x)
{
__builtin_memcpy (p, &x, sizeof x);
}
into
uint512_t D.3758;
D.3758 = MEM <uint512_t> [(char * {ref-all})&x];
MEM <uint512_t> [(char * {ref-all})p] = D.3758;
and later
uint512_t _2;
<bb 2> :
_2 = VIEW_CONVERT_EXPR<uint512_t>(x_1(D));
MEM <uint512_t> [(char * {ref-all})p_4(D)] = _2;
I don't see how I could handle that in bitint lowering when shifts,
BIT_IOR_EXPR etc.
will not work on such types.