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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|ICE with member of namelist |[14/15 Regression] ICE with
                   |renamed by use module       |member of namelist renamed
                   |                            |by use module
     Ever confirmed|0                           |1
                 CC|                            |anlauf at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P4
      Known to work|                            |13.3.0
   Target Milestone|---                         |14.3
      Known to fail|                            |14.1.0, 14.2.0, 15.0
   Last reconfirmed|                            |2024-08-29

--- Comment #2 from anlauf at gcc dot gnu.org ---
Reduced testcase:

module mod_nml1
  logical :: ldiag

  namelist /nam_nml1/ldiag
end module mod_nml1

module mod_interm
  use mod_nml1
end module mod_interm

program ice_nml
  ! Interchanging the following two lines fixes the ICE:
  use mod_nml1, ldiag_nml1 => ldiag
  use mod_interm

  integer :: ilu
  read(unit=ilu,nml=nam_nml1)
end program ice_nml


Works with Intel, NAG, Nvidia, flang.

As written above, interchanging the use statements fixes the ICE.

Reply via email to