https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119547
--- Comment #13 from Robin Dapp <rdapp at gcc dot gnu.org> --- Hmm, now I compiled with -O3 on top of --param logical-op-non-short-circuit=0 (which shouldn't actually be necessary or change anything as it's the default) but there is a segmentation fault in _ZN2cv12cpu_baselineL13cvtScale8u64fEPKhmS2_mPhmNS_5Size_IiEEPv Probably close enough to your issue?