[Wien] Syntax error in array constructor (gfortran)

tasaka at affinity-science.com tasaka at affinity-science.com
Thu Feb 21 07:26:55 CET 2013


Hello,

I encountered the follwoing errors when compiling in SRC_hf
with GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3.
if there are any options of gfortran to avoid these errors, please advise.

//
gfortran -ffree-form -O2 -ffree-line-length-none  -c calc_exhfvv_tmp_.F
calc_exhfvv_tmp_.F:269.22:

            igv = (/ 1:ng /)
                      1
Error: Syntax error in array constructor at (1)
calc_exhfvv_tmp_.F:272.22:

            igv = (/ 1:(igs-1),(igs+1):ng /)
                      1
Error: Syntax error in array constructor at (1)
make[1]: *** [calc_exhfvv.o] Error 1
//

Or, should I modify the codes as like below?

            igv = (/ (i, i=1,ng,1) /)


Any information would be appreciated.

With best regards,
Tomo





More information about the Wien mailing list