Hello all,
I’m working to extend Intel compiler support for fpm
, as part of a broader effort to enable oneAPI + IntelMPI as an automated package.
Currently, fpm cannot run the tests due to an issue with this namelist, whose minimum example is:
program nml_test
implicit none
character, parameter :: NL=new_line('a')
character(:), allocatable :: crashes,cmd,profile,args
integer, parameter :: max_names = 10
integer :: i
character(len=15), allocatable :: name(:)
namelist /settings/cmd,name,profile,args
! Init variables
name=[(repeat(' ',len(name)),i=1,max_names)]
cmd=repeat(' ',132)
profile=''
crashes = '&SETTINGS '//NL//&
'CMD="build", NAME=, profile="",ARGS="", ' //NL//& ! CRASH AT THIS LINE
' /'
read(crashes,nml=settings)
end program
returning
forrtl: severe (17): syntax error in NAMELIST input, unit -5, file Internal Formatted NML Read, line -1, position 38
The issue is that NAME=
has no delimiter for the character variable, and is not followed by a comma before profile
. gfortran builds and runs this line OK.
I would like to ask the community if I have stumbled upon a compiler issue, or instead the namelist text format is wrong? If I add a comma after NAME
, then everything works:
'CMD="build", NAME=, profile="",ARGS="", ' //NL//& ! Works
this example is also on Godbolt.
Thank you in advance for the pieces of advice!