https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98129
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- WORKSFORME on i386-*-freebsd with 'n = 10**m' and m = 1, 2, 3, ..., 8. On this system with ' n = 10**9', I get mobile:kargl[248] gfcx -o z -O a.f90 && ./z In file 'a.f90', around line 8: Error allocating 4000000000 bytes: Cannot allocate memory So, it looks target specific. Please change the component libgfortran to whatever target you are using.