Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

[Bug] Namelist directed output of assumed shape arrays

CWoel
Beginner
380 Views
I cannot write namelist-directed outputs that contain assummed-shape [thanks FortranFan for noticing] arrays. The below minimal example works as indented when compiled with gfortran but fails when compiled with ifortran like: ifort -O0 -g -check bounds nml_error.f90 -o nml_error nml_error.f90(16): catastrophic error: **Internal compiler error: internal abort** Please report this error along with the circumstances in which it occurred in a Software Problem Report. Note: File and line given may not be explicit cause of this error. compilation aborted for nml_error.f90 (code 1) module mod implicit none contains subroutine namelistWrite(array) real, dimension(:), intent(in) :: array integer :: istat namelist / foo / array open(unit=16, file='foo.nml', status='replace', action='write',& form='formatted', delim='apostrophe',iostat=istat) write(unit=16,nml=foo,iostat=istat) close(unit=16,status='keep',iostat=istat) end subroutine namelistWrite end module mod program testDriver use mod implicit none real, dimension(3) :: a = (/ 1.0, 2.0, 3.0 /) call namelistWrite(a) end program testDriver
0 Kudos
1 Reply
FortranFan
Honored Contributor II
380 Views

Submit this at the Intel OSC.

By the way, note the issue you are showing is with an ASSUMED-SHAPE array, not assumed size:

https://software.intel.com/en-us/fortran-compiler-18.0-developer-guide-and-reference-assumed-shape-specifications

0 Kudos
Reply