From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12olkn2039.outbound.protection.outlook.com [40.92.21.39]) by sourceware.org (Postfix) with ESMTPS id A1753395A41B for ; Wed, 29 Apr 2020 14:25:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A1753395A41B ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kk2vmo8qFUIkdB27Ih+HUuqJ5b10UwbjjHE32mcZxvwBDUi61gSBE+FcNqkuooi8gFYbXcktxsM9toPaU9IJWiqkFC63inue4I9do153oMVrs1BQdnKEkBRZF+aWvm5++Ay22YYGf0GMEnhNmFUMLI5vm9dOyOnQ8nqLAuL92sTAUEPiqqiEbxxt5xPJv5xhj8U/Lpjqi9w2++jxTYMOl9UXWUqvHPsmR28O5uHUISqgsN+20MzI2CV1G4cxNOau9Y6sAClVcWYpiZvaLWuoNNxHGGg7cQqh1xWLFvyDqIzx9dt0DkbmE5/lAVTXk2Y7MIapQojPv95FxXAHuWPHbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HjWm2Uf9kZf/6NUsBqnpLjrdy91RbPpxpig1DeVaacM=; b=hbcgCiC687EyehHMd9AQNNvo2MLRBQk7ndHhsHLN1NRj0nG9iiTU+LcKZz3kYGw2P8kCWw+A0feu+CfUetOIvPg8R+BL5ZxLK+PCfEmk0vJMzLkuZ34m/nYiAcmQu6KWF/DcMa81HG+6tMS9XiKtzh1dM5LtanO1gosQxG1P5l+wAFPxqD4/t+Hm8g5pzSVfsNHitGenZNG7F44HFlyaoheSvote1nzYf5zdCRxu9Sl47293CiItyItSag2QESs9mQqio/a7OtzeGUASk4L0pkOGmYlfjiRTso3yTirINOpE4DdDHBFu+9Vjd5250HUidcNCzeUieQ3O/08l90TMrA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=live.com; dmarc=pass action=none header.from=live.com; dkim=pass header.d=live.com; arc=none Received: from MW2NAM12FT035.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::43) by MW2NAM12HT169.eop-nam12.prod.protection.outlook.com (2a01:111:e400:fc65::272) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.12; Wed, 29 Apr 2020 14:25:40 +0000 Received: from YTOPR0101MB1804.CANPRD01.PROD.OUTLOOK.COM (10.13.180.60) by MW2NAM12FT035.mail.protection.outlook.com (10.13.181.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.12 via Frontend Transport; Wed, 29 Apr 2020 14:25:40 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2D249034C0266CAE0698A6FD63295F0DACD57D9D9C0E8E006876C1A54FC28743; UpperCasedChecksum:4913123909F2D1F93C49FE5B2D92DCA6EA310B3D23A9E3BDFE3CE88F745F533E; SizeAsReceived:8728; Count:50 Received: from YTOPR0101MB1804.CANPRD01.PROD.OUTLOOK.COM ([fe80::4985:5bb3:d88d:acf1]) by YTOPR0101MB1804.CANPRD01.PROD.OUTLOOK.COM ([fe80::4985:5bb3:d88d:acf1%5]) with mapi id 15.20.2937.028; Wed, 29 Apr 2020 14:25:40 +0000 Reply-To: tprince@intelretiree.com Subject: Re: Program on old fortran IV To: gcc-help@gcc.gnu.org References: From: Tim Prince Message-ID: Date: Wed, 29 Apr 2020 10:24:22 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-ClientProxiedBy: CH2PR18CA0044.namprd18.prod.outlook.com (2603:10b6:610:55::24) To YTOPR0101MB1804.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:1b::14) X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (75.107.39.177) by CH2PR18CA0044.namprd18.prod.outlook.com (2603:10b6:610:55::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Wed, 29 Apr 2020 14:25:36 +0000 X-Microsoft-Original-Message-ID: X-TMN: [dss5WvAd0O2w7v2uqmXbfruHfvKBQltu] X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 50 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 071e4079-543d-4ed7-77f8-08d7ec493152 X-MS-TrafficTypeDiagnostic: MW2NAM12HT169: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S8JWmneRalaHuFNg/8FY9ScutCRk0DYtXOu9tLzdUrydTQOvHbPHwK25RzVK53mcrWerlmZAZtGC6d0bkSZ+drCgQtGhRKSK3ooCtmaNSBTQH+I78mgYdNPfEBmI1zPs5ZldFXVA/m2zmzkLaw7OoxRknUK/CBBMPTFeYP1PBvRlpGvx0lqIQg8sjVNttYu+xaC0Lm2iOI0EtBRHyqWFIg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:0; SRV:; IPV:NLI; SFV:NSPM; H:YTOPR0101MB1804.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:; DIR:OUT; SFP:1901; X-MS-Exchange-AntiSpam-MessageData: DMfMBmGbOAepMTfzy27jyYg8H9NhvArRoTO2mqD+Z5l5t/5dqbVR+CZBrXgaU67Ppas2UBwhpF8NKAr01XRi8GWt8RD2GNT9IacWwE4H1YocJDjEkZGfFkgLt8zNYVFyU94q2wjgpxRIklAmFI09AQ== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 071e4079-543d-4ed7-77f8-08d7ec493152 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2020 14:25:40.6447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2NAM12HT169 X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_MUA_MOZILLA, FREEMAIL_FROM, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no 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: Wed, 29 Apr 2020 14:25:48 -0000 On 4/29/2020 9:37 AM, 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 > > 1- hollerith > > 2- “do" cycles indexed to an active command line instead of “enddo" or “continue”, e.g. > > do 10 i=1,n > x=x+1 > 10 y=y+1 > > 3-“if” of the type > > If (n) 10,20,30 > > All of this can be cleaned, but I have the feeling that in spite of the warnings the compiler still treats these 3 warnings correctly, since I could test it > with coherent results. > > 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. > > I am considering reviewing it fully, but first would like to know if there is some options that could help emulating > an older compiler for fortran IV. In the moment the fortran routines have type .f > > Thanks anyway > > Cheers > > João Correia Those old programs often made assumptions such as those covered by gfortran -fno-automatic -finit-local-zero .  There was no portability or standards checking in most compilers, and chances are your program was never analyzed for those.  I don't think gfortran carried over the -fone-trip option from g77, another assumption which many people considered erroneously to be part of f66 standard.   You may be stuck with setting implicit none and weeding out errors. -- Tim Prince