https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114626
--- Comment #3 from anlauf at gcc dot gnu.org --- Another option is to not declare max_sum as parameter but as variable. With integer :: max_sum = 2 * max_ij ** 3 the code compiles almost instantly, but it has noticeable runtime. (But it performs much better here than with Intel... :)