From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zm-mta-out-3.u-ga.fr (zm-mta-out-3.u-ga.fr [152.77.200.56]) by sourceware.org (Postfix) with ESMTPS id 329123858D1E for ; Sun, 1 Jan 2023 16:21:40 +0000 (GMT) Received: from mailhub.u-ga.fr (mailhub-1.u-ga.fr [129.88.178.98]) by zm-mta-out-3.u-ga.fr (Postfix) with ESMTP id 8CDFA40317; Sun, 1 Jan 2023 17:21:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=univ-grenoble-alpes.fr; s=2020; t=1672590098; bh=f2JZbCkJmCU66Eopqn45a4GvqSSsXgaubpZIaHnAMnM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Jzro7310U1KsdSnOQhE32swXOD/N4Yt/X9sbkXWPOvq9uM0E5L8vkshWKnQJ9PoHe FwZEOR0wRUgH/xx9WSZ7Hfs4mbBp3be4nHrb7mdWS8pvY4yChGeIaptl25gklLj6nJ hd4f+fYcqN+/mYB2Ss33lHrqZLCDNPA7Iir1ExwAu/LptaDu8/U2Ls0Yq0BBAsA0oX ZMOLueFqHPXG+sbriEXOsvvc+aCu32K/tJEPV0RNpJbK9hQIiX+U6Bw0jq5DHaIPff c+yc++1hEuDdrDwwAVyvHVs1lgt6WooLSYxNMI33RM+uQhN1M3Xqv1AJvxjwKcjXfm EMvjYvdzf4SbQ== Received: from smtps.univ-grenoble-alpes.fr (smtps3.u-ga.fr [195.83.24.62]) by mailhub.u-ga.fr (Postfix) with ESMTP id 8A02C10005A; Sun, 1 Jan 2023 17:21:38 +0100 (CET) Received: from [192.168.1.159] (82-64-214-7.subs.proxad.net [82.64.214.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: begoup@univ-grenoble-alpes.fr) by smtps.univ-grenoble-alpes.fr (Postfix) with ESMTPSA id 2655240053; Sun, 1 Jan 2023 17:21:38 +0100 (CET) Content-Type: multipart/alternative; boundary="------------ixFOO0mjBbnkvxZTMDvhXMC0" Message-ID: <06e08650-9ccd-902a-96bb-9677f026bc1c@univ-grenoble-alpes.fr> Date: Sun, 1 Jan 2023 17:21:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: Compiling file with subroutines using gfortran Content-Language: en-GB To: Jonathan Wakely Cc: Hans Lonsdale , gcc-help References: <166133795.746116.1672563145928@ichabod.co-bxl> <386d6312-6919-af36-5efa-e5ce3a8c886b@univ-grenoble-alpes.fr> From: Patrick Begou In-Reply-To: X-Greylist: Whitelist-UGA SMTP Authentifie (begoup@univ-grenoble-alpes.fr) via submission-587 ACL (41) X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE,JMQ_SPF_NEUTRAL,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: This is a multi-part message in MIME format. --------------ixFOO0mjBbnkvxZTMDvhXMC0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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, > 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. > > > > > --------------ixFOO0mjBbnkvxZTMDvhXMC0--