Maximum number of gfortran continuation lines

Viewed 371

I need a little help: according to this site, there is a limit on the maximum number of continuation lines.

So I decided to test this. I wrote a jumbo FUNCTION where it computes colossal algebraic formula expressed in statement split into 17,146 continuation lines.

!test.f90  1.6 MB file
DOUBLE COMPLEX FUNCTION myfunction(a, b)

  DOUBLE COMPLEX, INTENT(IN) :: a
  DOUBLE COMPLEX, INTENT(IN) :: b

  myfunction = gd0/16.d0)*a*b*((a+b)**2)*((32.d0*DCONJG(f(4)))+(12&
&8.d0*DCONJG(f(11)))+(160.d0*DCONJG(f(24)))+(64.d0*DCONJG(f(46)))+(32.d0*DCONJG(f(3)))+(256.d0*DCON&
&JG(f(10)))+(480.d0*DCONJG(f(23)))+(256.d0*DCONJG(f(45)))+(32.d0*DCONJG(g(9)))+(128.d0*DCONJG(f(&
&9)))+(480.d0*DCONJG(f(22)))+(384.d0*DCONJG(f(44)))+(96.d0*DCONJG(g(21)))+(160.d0*DCONJG(f(21)))+(2&
&56.d0*DCONJG(f(43)))+(64.d0*DCONJG(g(42)))+(64.d0*DCONJG(f(42)))+(64.d0*DCONJG(f(8)))+(192.d0*DCON&
& (64.d0*DCONJG(g(42)) ! and so on and so forth...

END FUNCTION

I compiled this abomination with gfortran -c test.f90, and it returned an 11.4MB test.o file after 5 minutes, without any errors or warnings. I ran it, and it returned correct results.

Why isn't gfortran observing the maximum continuation lines rule?

1 Answers
Related