The attached fortran code (a smaller section cut and paste from original) was generated by a custom preprocessor. The code very much seems to be valid fortran 77, though its has some weird tab spacings; It compiles (and executes) fine with pgf90 and ifort-8.x. The compile time error is as below (same with gfortran-4.1.2, 4.2 and 4.3.0 trunck build); [armnlib@agape ~]$ gfortran -c -fcray-pointer adw_test.f adw_test.f:61.9: a(m,1) = p(m,1) * F_in (o1(m,1)-1) + p(m,2) * F_in (o1(m,1)) 1 Error: Unclassifiable statement at (1) adw_test.f:90.8: %(m,3) * F_in (o1(m,3)+1) + p(m,4) * F_in (o1(m,3)+2) 1 Error: Expected PARAMETER symbol in complex constant at (1) adw_test.f:94.8: %(m,3) * F_in (o3(m,3)+1) + p(m,4) * F_in (o3(m,3)+2) 1 Error: Expected PARAMETER symbol in complex constant at (1)
Created attachment 13374 [details] testcase (cut and paste from original) I can provide the whole file if necessary
Your lines are too wide, hoping that bugzilla will not mess up the formatting I'll quote an example: 1 2 3 4 5 6 7 123456789012345678901234567890123456789012345678901234567890123456789012345 a(m,1) = p(m,1) * F_in (o1(m,1)-1) + p(m,2) * F_in (o1(m,1)) + %p(m,3) * F_in (o1(m,1)+1) + p(m,4) * F_in (o1(m,1)+2) ^^ Per the standard, fixed form lines are 72 characters and everything beyond is ignored, so the plus is not read. The -ffixed-line-length option should solve your problem. Closing as INVALID.
To the reporter: Even though this is already (correctly) closed as INVALID, please let us know if your code does compile and run correctly if you compile with the suggested extra command line option, -ffixed-line-length.
(In reply to comment #3) > To the reporter: > Even though this is already (correctly) closed as INVALID, please let us know > if your code does compile and run correctly if you compile with the suggested > extra command line option, -ffixed-line-length. Yes, sorry, I forgot to say that.
Yes adding compiling with -ffixed-line-length-80 solved the issue for me, thanks to you both. I've noticed the original author of that code used tabs in a couple of space he should have used spaces, the other compilers I tried with probably sees the tab as a single separator while gfortran fleshed it out to 3 spaces. I've added -ffixed-line-length-80 to the Makefile to handle similar other cases in the model.
.