fpm test fails
Closed this issue · 1 comments
freevryheid commented
...
rm-.f90 done.
pwd-.f90 done.
quadratic.f90 failed.
[ 42%]Compiling...
app/quadratic.f90:146:19:
146 | namelist /coeff/ A, B, C
| 1
Error: Symbol ‘a’ in namelist ‘coeff’ at (1) must be declared before the namelist is declared.
compilation terminated due to -fmax-errors=1.
<ERROR> Compilation failed for object " app_quadratic.f90.o "
<ERROR>stopping due to failed compilation
STOP 1
I've never used namelist before but moving line 146 in quadratic.f90
below the variable definitions of A, B and C as suggested by gfortran appears to fix the issue.
urbanjost commented
Thanks. I moved it. It is a common extension with several compilers to allow out-of-order declarations which is indeed non-standard so that has been getting through for a long time but is definitely wrong. The change should be in. Hopefully, that looks good. What compiler version/ options were you using? At least with the versions I have gfortran and ifort compiled that silently by default.