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 C1E473858D1E for ; Sun, 1 Jan 2023 11:59:55 +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 5707D402EC; Sun, 1 Jan 2023 12:59:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=univ-grenoble-alpes.fr; s=2020; t=1672574394; bh=SnzKFCUmt8Lc5kCEgdfRLnn2omdBEwR+aB/ZYrpk2u4=; h=Date:Subject:To:References:Cc:From:In-Reply-To:From; b=oy744yvYrwVB8e/NS1h12pEfFhiC0AAxCIInhQWbfP8/xxhUHbPisvdsU4GmEzfvl JXDejEdDNc7pzM5SDony0JhyYbTqx7UnXXR14Of8wp43XHX1TgH44TTSM7AFNVgU14 59r3WpYZup1s6zultdJXpky0yu9pZIV7O+EdnVH+ygTjTVTzd1WwX2l7sP8ZArcZUb 2HJGgo66i3oMg6bAzpKv5+EHSx8ao+ccxf1ZwwwPkkNoK/X26TS5nEBEr+M4FXkCvZ vj5g4xZ8nynvFQF7KeDFkiHBwl/FMOf61lx4drDRYxiJuBp1ceD5TbOOFvoPk/iDnf PaHj87QHt7zMg== Received: from smtps.univ-grenoble-alpes.fr (smtps3.u-ga.fr [195.83.24.62]) by mailhub.u-ga.fr (Postfix) with ESMTP id 54E0210005A; Sun, 1 Jan 2023 12:59:54 +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 0A6E840053; Sun, 1 Jan 2023 12:59:53 +0100 (CET) Content-Type: multipart/alternative; boundary="------------vknDFAdxheMDCJXUDd9xtIW0" Message-ID: <386d6312-6919-af36-5efa-e5ce3a8c886b@univ-grenoble-alpes.fr> Date: Sun, 1 Jan 2023 12:59:53 +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: fr To: Hans Lonsdale References: <166133795.746116.1672563145928@ichabod.co-bxl> Cc: gcc-help From: Patrick Begou In-Reply-To: <166133795.746116.1672563145928@ichabod.co-bxl> X-Greylist: Whitelist-UGA SMTP Authentifie (begoup@univ-grenoble-alpes.fr) via submission-587 ACL (41) X-Spam-Status: No, score=-3.9 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. --------------vknDFAdxheMDCJXUDd9xtIW0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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. > > --------------vknDFAdxheMDCJXUDd9xtIW0--