native_interpret_real in fold_const.c has an assumption that floats are at least 32-bits (on bigendian targets with UNITS_PER_WORD >= 4). This patch relaxes that assumption (allowing e.g. 16-bit HFmode values). On aarch64_be-none-elf, this fixes the float16x4_t variant of gcc.target/aarch64/advsimd-intrinsics/vcreate.c added in the next patch in series. Bootstrapped + check-gcc on: x86-unknown-linux-gnu powerpc64-unknown-linux-gnu (gcc110 on compile farm, as I believe this is bigendian, as opposed to powerpc64le-unknown-linux-gnu on gcc112) arm-none-linux-gnueabihf aarch64-none-elf It's not clear that any of those actually test this code, but the aarch64_be-none-elf tests in next patch definitely do ;). gcc/ChangeLog: fold-const.c (native_interpret_real): Correctly read floats of less than 32 bits on bigendian targets.