From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.cristiesoftware.com (mail.cristiesoftware.com [62.172.98.87]) by sourceware.org (Postfix) with ESMTPS id 1BDD83898507 for ; Thu, 30 Apr 2020 14:59:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1BDD83898507 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cristie.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=BobW@cristie.com Received: from cristie.com (10.10.28.1) by CS-EXCHANGE.cristiesoftware.com (10.0.1.112) with Microsoft SMTP Server (TLS) id 15.1.396.30; Thu, 30 Apr 2020 15:59:43 +0100 Date: Thu, 30 Apr 2020 15:59:42 +0100 From: Bob Wilkinson To: Joao Martins Correia CC: "gcc-help@gcc.gnu.org" Subject: Re: Program on old fortran IV Message-ID: <20200430145942.GB2626659@cristie.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux bobpc2 5.5.0-1-amd64 X-Debian-Version: bullseye/sid X-Originating-IP: [10.10.28.1] X-ClientProxiedBy: CS-EXCHANGE.cristiesoftware.com (10.0.1.112) To CS-EXCHANGE.cristiesoftware.com (10.0.1.112) X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Apr 2020 14:59:46 -0000 On Wed, Apr 29, 2020 at 01:37:25PM +0000, Joao Martins Correia wrote: > Dear Gcc Helpers > > I recovered an old scientific program code written in Fortran IV. > Still using hollerith assignments - which I think I understand, I can compile it with the many warnings > regarding essentially 3 things > > The program starts running, properly, reads input files and execute some routines, but then gets stuck with strange huge > numbers that have no apparent reason to be there. > The problem is in fact that there are no assignment of variable types and there are many commons with different variable names > that contribute to the confusion when debugging. Setting “implicit none” creates too many errors, since sometimes is not easy > to assign the type of the variable on a code with 30 routines and more than 5000 lines. It is many years since I did any FORTRAN programming, but I vaguely remember that implicit none could be used on a subroutine by subroutine basis (though that is probably compiler-dependent). If this works for you, it may make your job easier. I do not like implicit ... Bob -- "We are in the beginning of a mass extinction, and all you can talk about is money and fairy tales of eternal economic growth." - Greta Thunberg