https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109531
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- command line that in the end needed to reproduce with the original non-reduced testcase: -std=c++14 -march=znver3 -O2 -fno-strict-aliasing -Wall Note you need all of those options to get the ICE.