From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by sourceware.org (Postfix) with ESMTPS id B3B5F3858C30 for ; Sun, 1 Jan 2023 13:33:02 +0000 (GMT) Received: by mail-ed1-x52f.google.com with SMTP id j16so4197452edw.11 for ; Sun, 01 Jan 2023 05:33:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=VWl0x8o7TApuwAf8OjnJKWaO9iLoEXpqIX74i1a5vbU=; b=EDDnvQAMmYZik/altz1NrPEFmaiUACkDVfHLRVWDTsyvp10C4mqCWGAvPIOd2I+te4 NAw3bV/QYkkEveqUZyWpxj4nzMZLIjHczwTRXMf/cduGeWv12+Il0+xXQuCvXmAtD911 fHrN1PtkNfMMfd3bGuhkQm9vsnoXLF4VWAWLBVfPIJ+gPLrGZR8l7r/5T6p/WJDjBD1y k5MDoObL0xWpY7VT+xjEfvA6JG9y3ozt/FXzafFS29maHVBhgmv7caZJ3k4Qdf5cyaF6 Aud1MiTgsgLNOePV5JYU6y6wWTxW8rUSPb1+MBFRvlSiMfgJbtDh9v0HFXN3u+feeVoA wMSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VWl0x8o7TApuwAf8OjnJKWaO9iLoEXpqIX74i1a5vbU=; b=wUfY7Tdqukn/lEPB/1EdRhPAx/VvK/PH9hhEEKwzWXpZypz9NSs/uSX2fnHEMti5L1 cDxaZS/OpIuvTYGaKm0eKmR1qzkRnwUyJ9C4YJpdqdhTSF9IxFyuKSQ3MCn0P8k0Y4a2 97Wb15SLj7bGOwxXfA7x39keoIx9aujYz32hIY43lizmzhSHj3lxtB9bPPgU8nrGf5XH eRirz9iplFYOP3eBc5KG4vlliWhppHXIwca9VI26G1diHpPbzkd8BJ42KAjxtoWaa7Zs 5U+ls52OudEgaxS2qud59RBwHyfIIONULAbCG3KKh//S08H3aioVtenT4G1IQZeXTvJ4 oARA== X-Gm-Message-State: AFqh2kqFD+2EFgiun+b5Tjy9uKeQ3TmVIAjHiDFix4cHpSbM02P+Q4uI QWFeLf96s1NNvGoougPyCCSKwNrCxzQhC8mEBUI= X-Google-Smtp-Source: AMrXdXugUmNGFHolmTrMKv4QLC3PrZHF3fg2+ddHjAjoATejSb77+pEC022ifbXD29sxwhiOlG+V/ilzqiwdpr/xcPk= X-Received: by 2002:a05:6402:2993:b0:46c:af80:636c with SMTP id eq19-20020a056402299300b0046caf80636cmr4146395edb.129.1672579981384; Sun, 01 Jan 2023 05:33:01 -0800 (PST) MIME-Version: 1.0 References: <166133795.746116.1672563145928@ichabod.co-bxl> <386d6312-6919-af36-5efa-e5ce3a8c886b@univ-grenoble-alpes.fr> In-Reply-To: <386d6312-6919-af36-5efa-e5ce3a8c886b@univ-grenoble-alpes.fr> From: Jonathan Wakely Date: Sun, 1 Jan 2023 13:32:49 +0000 Message-ID: Subject: Re: Compiling file with subroutines using gfortran To: Patrick Begou Cc: Hans Lonsdale , gcc-help Content-Type: multipart/alternative; boundary="000000000000a61e7a05f133df0e" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --000000000000a61e7a05f133df0e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 =C3=A0 09:52, Hans Lonsdale via Gcc-help a =C3=A9crit : > > > > 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. > > > > > --000000000000a61e7a05f133df0e--