You are using a wrong option that may overwrite your fortran source file with the result of the compilation.. To create only the .o file use: gfortran -O3 -ffree-form*-c* myfile.f or, f you want: gfortran -O3 -ffree-form*-c* myfile.f*-o myfile.o* it will do the same thing. Patrick Le 01/01/2023 à 09:52, Hans Lonsdale via Gcc-help a écrit : > > I want to compile a file containing a number of subroutines. > > I am using the command > > gfortran -O3 -ffree-form -o myfile.f > > But getting problems with recursive and END PROGRAM statement. > > All I want is making the object file. > > 44 | recursive subroutine quicksort (array) > | 1 > Error: Unclassifiable statement at (1) > myfile.f:112:3: > > 112 | end subroutine quicksort > | 1 > Error: Expecting END PROGRAM statement at (1) > myfile.f:122:35: > > Have done > > gfortran -O3 -ffree-form -o myfile.f > > The command is supposed to make the object file, but I get errors with END PROGRAM declaration. > >