@@ -1751,16 +1751,20 @@ let alloc_generic_set_fn block ofs newval memory_chunk dbg =
1751
1751
addr_array_initialize block ofs newval dbg
1752
1752
| Word_int -> generic_case ()
1753
1753
(* Generic cases that may differ under big endian archs *)
1754
- | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed | Single _
1755
- | Double | Thirtytwo_unsigned | Thirtytwo_signed | Onetwentyeight_unaligned
1756
- | Onetwentyeight_aligned ->
1754
+ | Single _ | Double | Thirtytwo_unsigned | Thirtytwo_signed
1755
+ | Onetwentyeight_unaligned | Onetwentyeight_aligned ->
1757
1756
if Arch. big_endian
1758
1757
then
1759
1758
Misc. fatal_errorf
1760
1759
" Fields with memory_chunk %s are not supported on big-endian \
1761
1760
architectures"
1762
1761
(Printcmm. chunk memory_chunk);
1763
1762
generic_case ()
1763
+ (* Forbidden cases *)
1764
+ | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed ->
1765
+ Misc. fatal_errorf
1766
+ " Fields with memory_chunk %s are not supported in generic allocations"
1767
+ (Printcmm. chunk memory_chunk)
1764
1768
1765
1769
let make_alloc_generic ~block_kind ~mode ~alloc_block_kind dbg tag wordsize args
1766
1770
args_memory_chunks =
@@ -1860,17 +1864,19 @@ let make_mixed_alloc ~mode dbg ~tag ~value_prefix_size args args_memory_chunks =
1860
1864
(* regular scanned part of a block *)
1861
1865
match memory_chunk with
1862
1866
| Word_int | Word_val -> ok ()
1863
- | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed
1867
+ | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed ->
1868
+ error " mixed blocks"
1864
1869
| Thirtytwo_unsigned | Thirtytwo_signed | Single _ | Double
1865
1870
| Onetwentyeight_unaligned | Onetwentyeight_aligned ->
1866
1871
error " the value prefix of a mixed block"
1867
1872
else
1868
1873
(* flat suffix part of the block *)
1869
1874
match memory_chunk with
1870
1875
| Word_int | Thirtytwo_unsigned | Thirtytwo_signed | Double
1871
- | Onetwentyeight_unaligned | Onetwentyeight_aligned | Single _
1872
- | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed ->
1876
+ | Onetwentyeight_unaligned | Onetwentyeight_aligned | Single _ ->
1873
1877
ok ()
1878
+ | Byte_unsigned | Byte_signed | Sixteen_unsigned | Sixteen_signed ->
1879
+ error " mixed blocks"
1874
1880
| Word_val -> error " the flat suffix of a mixed block" )
1875
1881
0 args_memory_chunks
1876
1882
in
0 commit comments