From: Allin Cottrell <cottrell@wfu.edu>
To: Jerry D <jvdelisle2@gmail.com>
Cc: gfortran <fortran@gcc.gnu.org>
Subject: Re: Compile antiquated fortran?
Date: Thu, 27 Jul 2023 19:09:15 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.20.3.2307271904490.3112395@myrtle> (raw)
In-Reply-To: <b0ae63c3-949c-ffa8-854e-d32382461b30@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]
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
prev parent reply other threads:[~2023-07-27 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 17:36 Allin Cottrell
2023-07-27 18:21 ` Steve Kargl
2023-07-27 20:27 ` Jerry D
2023-07-27 23:09 ` Allin Cottrell [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=alpine.LFD.2.20.3.2307271904490.3112395@myrtle \
--to=cottrell@wfu.edu \
--cc=fortran@gcc.gnu.org \
--cc=jvdelisle2@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).