egcs-1.1.1: g77: -pedantic

wefing@kato.pci.uni-heidelberg.de wefing@kato.pci.uni-heidelberg.de
Mon Dec 14 09:03:00 GMT 1998


hi,

g77 with the -pedantic option in effect complains about function references
with empty argument lists. consider the following simple program:

power.f    -----------------------------------------------------------------
      program power
      include 'file1.inc'
      real*8 x,y
      integer i

      write(6,*) "n?"
      read(5,*) n

      y=0.999
      do i=1n
         x=y**2.1d0
      enddo

      i=f1()
      stop
      end

      integer function f1()
      f1=20
      return
      end
---------------------------------------------------------------------------

invocation of g77 yields the following output:

g77 -O -pedantic -o power power.f
power.f: In program `power':
power.f:13:
         i=f1()
              ^
Expression at (^) has incorrect data type or rank for its context

Compilation exited abnormally with code 1 at Mon Dec 14 17:04:38

as far as i know, the f77 standard das permit empty argument lists.

best regards,

stephan wefing


+-------------------------------------------------------------------+
|  Stephan Wefing                                                   |
|  Theoretische Chemie                                              |
|  Universitaet Heidelberg                                          |
|  Im Neuenheimer Feld 253                                          |
|  D-69120 Heidelberg                                               |
+-------------------------------------------------------------------+
|  e-mail: wefing@gmx.de         |  Tel. :  +49 +6221 548515        |
|  Fax   :  +49 +6221 54 5221    |  Tel. :  +49 +6221 435947        |
+-------------------------------------------------------------------+


i'm using a PII machine with suse linux 5.3, kernel 2.0.35.

wefing/ftest> g77 -v
g77 version egcs-2.91.60 19981201 (egcs-1.1.1 release) (from FSF-g77 version
0.5
.24-19980804)
Driving: g77 -v -c -xf77-version /dev/null -xnone
Reading specs from
/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.
60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.60/cpp -lang-c
-v
-undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -D__ELF__ -D__unix__ -D__i386__
-D__i386
__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(posix) -D_LANGUAGE_FORTRAN
-
traditional -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386
-D__i386_
_ -Di686 -Dpentiumpro -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__
/dev/n
ull /dev/null
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/egcs/i686-pc-linux-gnulibc1/include
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.60/include
 /usr/include
End of search list.
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.60/f771
-fnull-ver
sion -quiet -dumpbase g77-version.f -version -fversion -o /tmp/ccgqgKBr.s
/dev/n
ull
GNU F77 version egcs-2.91.60 19981201 (egcs-1.1.1 release)
(i686-pc-linux-gnulib
c1) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
GNU Fortran Front End version 0.5.24-19980804
 as -V -Qy -o /tmp/ccquLamJ.o /tmp/ccgqgKBr.s
GNU assembler version 2.9.1 (i486-linux), using BFD version 2.9.1.0.4
 ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.1 -o /tmp/ccuHG1K3
/tmp/ccquLam
J.o /usr/lib/crt1.o /usr/lib/crti.o
/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gn
ulibc1/egcs-2.91.60/crtbegin.o
-L/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnuli
bc1/egcs-2.91.60 -L/usr/local/egcs/i686-pc-linux-gnulibc1/lib
-L/usr/local/egcs/
lib -lg2c -lm -lgcc -lc -lgcc
/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1
/egcs-2.91.60/crtend.o /usr/lib/crtn.o
 /tmp/ccuHG1K3
__G77_LIBF77_VERSION__: 0.5.24
@(#)LIBF77 VERSION 19970919
__G77_LIBI77_VERSION__: 0.5.24-19980920
@(#) LIBI77 VERSION pjw,dmg-mods 19980617
__G77_LIBU77_VERSION__: 0.5.24
@(#) LIBU77 VERSION 19980709




More information about the Gcc-bugs mailing list