https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105381

            Bug ID: 105381
           Summary: [12 Regression] Memory-hog since r12-8230
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

The following reduced code shows an issue with an apparently infinite
compile-time loop.

MODULE m
  implicit none
  integer,  parameter :: ncrit  =  8
  integer,  parameter :: nterm  =  7
contains

  subroutine new_thin_rule (rule1)
    character(*),intent(in) ,optional :: rule1(ncrit)
    character(len=8) :: rules (ncrit,nterm)
    rules = ''
    if (present (rule1)) rules(:,1) = rule1  ! <-- compile time hog
  end subroutine new_thin_rule

end module m

This eats lots of memory...

Fails with r12-8230, works with r12-8223.

Reply via email to