www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1998/03/25/03:10:34

X-pop3-spooler: POP3MAIL 2.1.0 b 3 961213 -bs-
Delivered-To: pcg AT goof DOT com
Message-ID: <351882E0.F9A9F5AD@tech.chem.ethz.ch>
Date: Wed, 25 Mar 1998 05:06:56 +0100
From: Jochen Heyd <jheyd AT tech DOT chem DOT ethz DOT ch>
X-Mailer: Mozilla 4.03 [en] (X11; I; Linux 2.0.30 i586)
MIME-Version: 1.0
To: beastium-list AT Desk DOT nl
Subject: Problem with unusual array dimensions in Fortran
Sender: Marc Lehmann <pcg AT goof DOT com>
Status: RO
X-Status: A
Lines: 73

Hello everybody,

after trying pgcc on one quantum chemistry code and getting speed
improvements of about 40% (almost all it does is floating point
arithmetic), I also wanted to recompile another one. During the course
of this, I discovered the following problem in pg77-1.0.1 (offical
binaries for Linux) with this Fortran program:

      program test

      implicit none

      integer a(-1:5)

      call sub(a)

      end

      subroutine sub(b)

      integer b(-1:*)

      end


This is valid Fortran77 (checked in the standard) and compiles without
error using g77/gcc 2.7.2.1, but produces the following error with pg77:


fortran/test> g77 -v test.f
Reading specs from
/usr/lib/gcc-lib/i586-pc-linux-gnulibc1/pgcc-2.90.23/specs
gcc version pgcc-2.90.23 980102 (egcs-1.0.1 release)
 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/pgcc-2.90.23/f771 test.f
-fset-g77-defaults -quiet -dumpbase test.f -version -fversion -o
/tmp/cca01038.s
GNU F77 version pgcc-2.90.23 980102 (egcs-1.0.1 release)
(i586-pc-linux-gnulibc1) compiled by GNU C version pgcc-2.90.23 980102
(egcs-1.0.1 release).
GNU Fortran Front End version 0.5.22-19970929
test.f: In subroutine `sub':
test.f:12: 
         subroutine sub(b)
                        ^
Array `b' at (^) is too large to handle


Any ideas? Does it use an unsigned int?
Any help would be appreciated, it would be possible to rewrite a couple
of subroutines, but this construct is used too often for that.

I just joined the mailing list and I'm not sure the majodomo got me, so
please also reply directly.

Thanks a lot in advance

Jochen Heyd

-- 
____________________________________________________________________

    _/_/_/ _/_/_/ _/  _/       Jochen Heyd
   _/       _/   _/  _/       Manager of Information Systems
  _/_/     _/   _/_/_/       Safety & Environmental Technology Group
 _/       _/   _/  _/       ETH-Zentrum, CAB D46
_/_/_/   _/   _/  _/       CH-8092 Zurich
                          Switzerland                           
                             
 Swiss Federal Institute      tel: ++41-1-632 71 42
of Technology, Zurich        cell: ++41-79-447 64 27
                            FAX: ++41-1-632 11 89
                           e-mail:jheyd AT tech DOT chem DOT ethz DOT ch
____________________________________________________________________

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019