From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by sourceware.org (Postfix) with ESMTPS id B22BE3858D37 for ; Thu, 27 Jul 2023 23:09:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B22BE3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=wfu.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=wfu.edu Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-5841be7d15eso16070397b3.2 for ; Thu, 27 Jul 2023 16:09:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wfu.edu; s=google; t=1690499357; x=1691104157; h=content-id:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=Hnj+0z7Bbl59HjYdQUWA3NuqlJw3vAAHKriOTAmabqA=; b=UvmGiIMd4mrk+hpYBDq6qbidFpDPWh8Cz4yfGveHb8lC3MRlW9re1bio9qIOCM/hXg duO0JRidX2lXFXOzNzl3GaaO6l5XDNr3ydHYxsnTe2O3yMdvYZ/nEUwmoqe42prN656S Pe+umgo11/owhq+0VEOFrWPZBzoKTSazTRHk8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690499357; x=1691104157; h=content-id:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hnj+0z7Bbl59HjYdQUWA3NuqlJw3vAAHKriOTAmabqA=; b=POlc5dfbZX0tpbN32KAKkcvSBoDMSvfl/aWNvDRRDR0wr5vDD86f3UJ+iVI3iMUb7B Yvvcb6Ru6lAR31bkSHXdBQfqPNwIJedHeK+ZM8oeQooL+zvGWOtjvpfNaeYppEEfivRc rPPoVooV5FLVXw3rzTsTEAYqzPXUt3MEljCUMXxhxe7DUZgFgJZ6D9/BikUDvgTIP9p3 qnhQK/rbCEqUViTfZCz19jCZCRlxQqZvcRq5QfqYEqb3Tk/y73ok4vE1i3m2FGZ2F7E2 OuW8EQE0jffNhuaNmrMfoM5FidEVbdtZxuQIdtM1wviVr5n+0U6QKIsmb3UUs6TMGCuT ziaA== X-Gm-Message-State: ABy/qLZ5gMF7QU3rSOpOTa6/KS5m01Peckl8jWOqQLtQj6Z7X5GwR3cL cC9vDrrEBrxghNKkx5e45ICLOA== X-Google-Smtp-Source: APBJJlEGxROZBs/l2PG5S7YTlD9D217aQr2CwpQ6sKnBe2t4B+sRNM+VTewkGguwSDmEQU2exLyW9g== X-Received: by 2002:a0d:d755:0:b0:583:d054:229 with SMTP id z82-20020a0dd755000000b00583d0540229mr49191ywd.36.1690499356997; Thu, 27 Jul 2023 16:09:16 -0700 (PDT) Received: from myrtle ([2600:1702:2220:5af0::506]) by smtp.gmail.com with ESMTPSA id r62-20020a0de841000000b0058451237d7dsm695271ywe.119.2023.07.27.16.09.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 27 Jul 2023 16:09:16 -0700 (PDT) Date: Thu, 27 Jul 2023 19:09:15 -0400 (EDT) From: Allin Cottrell X-X-Sender: allin@myrtle To: Jerry D cc: gfortran Subject: Re: Compile antiquated fortran? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20.3 (LFD 70 2015-03-15) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="-1463794943-742444215-1690499219=:3112395" Content-ID: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: ---1463794943-742444215-1690499219=:3112395 Content-Type: text/plain; CHARSET=UTF-8; FORMAT=flowed Content-Transfer-Encoding: 8BIT Content-ID: On Thu, 27 Jul 2023, Jerry D wrote: > On 7/27/23 1:36 PM, Allin Cottrell via Fortran wrote: >> I have old fortran source code (not my own work) for a specialized >> statistical program that I and others find quite useful. >> >> A few years ago I was able to compile it on Linux using gfortran with >> std=legacy (and also cross-compile it for Windows an Mac). Now I'd like to >> rebuild it, but with recent gfortran (I've tried 12.2.1 on Fedora and >> 13.1.1 on Arch) it's a no-go. I get lots of errors of the following sort: >> >> ansub9.f:151:44: >> >>   151 |    INTEGER ITYPE,INIT,LAM,IMEAN,IP,ID,Q,BP,BD,BQ,SQG,MQ,L,M, >>       |                                       1 >> Error: Symbol ‘q’ at (1) already has basic type of REAL >> >> I can understand this complaint. The code contains this sort of thing >> within a given subroutine: >> >>        IMPLICIT  REAL*8 (A-H,O-Z) > > Have you considered replacing the above line with IMPLICIT NONE and add > explicit declarations as needed? The code will be safer in the long run. That would be a good solution, for sure, but I don't think I understand the original code well enough to make the required changes. Meanwhile, though, Steve Kargl has suggested a nice fix which just involved moving one block of the code. Allin Cottrell ---1463794943-742444215-1690499219=:3112395--