Test utf8-pointer fails with static build, LTO, optimisations, and new GCC
Hey,
I've stumbled upon a bit elaborate issue. Test utf8-pointer
fails when I build a static variant of the library with LTO and -O2 optimisations enabled. I can reproduce it on the latest ArchLinux and Ubuntu 19.10 (both have GCC 9.2.*) but it doesn't occur on Ubuntu 18.04 (GCC 7.4.0).
The steps to reproduce:
export CFLAGS="-O2"
meson setup ../_build \
--default-library static \
--buildtype release \
-Db_lto=true \
-Dselinux=disabled \
-Dman=false \
-Dgtk_doc=false \
-Dinternal_pcre=false
ninja -C ../_build
meson test -C ../_build utf8-pointer