https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89619
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- It does terminate, it just takes a long time: $ time g++-7.3.0 t.cc -O1 real 6m16.685s user 6m16.163s sys 0m0.038s With GCC 8.2.0 it's much faster: real 0m44.389s user 0m44.029s sys 0m0.057s With a recent build from gcc-8-branch (8.3.1 20190303) it's almost instant: real 0m0.066s user 0m0.053s sys 0m0.014s This is probably a duplicate of one of the existing bugs about initialization of large arrays.