From: Patrick Begou <Patrick.Begou@univ-grenoble-alpes.fr>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: Hans Lonsdale <hanslonsdale@mailfence.com>,
gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Compiling file with subroutines using gfortran
Date: Sun, 1 Jan 2023 17:21:37 +0100 [thread overview]
Message-ID: <06e08650-9ccd-902a-96bb-9677f026bc1c@univ-grenoble-alpes.fr> (raw)
In-Reply-To: <CAH6eHdQmb-JC6AaVdyKkwZG7iBXYQYFw10M71hyNfZ53Jo2O_w@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1640 bytes --]
You're right Jonathan, sorry forthe mistake.
Please read:
gfortran -O3 -ffree-form -c myfile.f
and
gfortran -O3 -ffree-form -c myfile.f -o myfile.o
Patrick
Le 01/01/2023 à 14:32, Jonathan Wakely a écrit :
>
>
> On Sun, 1 Jan 2023, 12:01 Patrick Begou via Gcc-help,
> <gcc-help@gcc.gnu.org> wrote:
>
> 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*
>
>
>
> This markup doesn't really help in plain text rendering.
>
>
>
>
> 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.
> >
> >
>
prev parent reply other threads:[~2023-01-01 16:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-01 8:52 Hans Lonsdale
2023-01-01 11:59 ` Patrick Begou
2023-01-01 13:32 ` Jonathan Wakely
2023-01-01 14:41 ` Hans Lonsdale
2023-01-01 16:21 ` Patrick Begou [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06e08650-9ccd-902a-96bb-9677f026bc1c@univ-grenoble-alpes.fr \
--to=patrick.begou@univ-grenoble-alpes.fr \
--cc=gcc-help@gcc.gnu.org \
--cc=hanslonsdale@mailfence.com \
--cc=jwakely.gcc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).