intrinsic options for g77.

Hannes.Loeffler@uibk.acdot Hannes.Loeffler@uibk.acdot
Thu Jan 8 08:56:00 GMT 1998


Toon Moene <toon@moene.indiv.nluug.nl> writes:

> Gerlach,
> 
> >    We use g77 to compile a large Finite Element Method
> >   program on Linix. In this program we use subroutines
> >   like MATMUL. We heave to supplie a flag
> >   -ff90-intrinsics-delete to compile it. These flags are
> >   not handled well by the f771 backend. I contacted Craig
> >   Burley and he told me what to do. As a result I send
> >   you the file (gcc/f/)lang-options.h which is patched
> >   for this. I made all the compilers succesfully with it
> >   on Linux Red Hat 5.0.
> 
> I do not understand your problem.
> 
> Given the following Fortran source:
> 
> % cat beinum.f
>       call matmul(a,b,c)
>       end
> 
> using:
> 
> % /usr/test/bin/g77 -v
> Reading specs from  
> /usr/test/lib/gcc-lib/m68k-next-nextstep3/egcs-2.90.23/specs
> gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
> 
> I get:
> 
> % /usr/test/bin/g77 beinum.f
> beinum.f: In program `MAIN__':
> beinum.f:1: warning:
>          call matmul(a,b,c)
>               ^
> Reference to unimplemented intrinsic `MATMUL' at (^) (assumed EXTERNAL)
> /bin/ld: Undefined symbols:
> _matmul_
> collect2: ld returned 1 exit status
> 
> Which seems the correct behaviour to me:  The compiler warns you  
> that you have used a name for a subroutine that is the name of an  
> intrinsic in Fortran 90 (not yet supported) which you forgot to  
> declare EXTERNAL (as all external, i.e. your own, routines should).
> 
> If you use -ff90-intrinsics-delete, then - as per the documentation  
> - g77 "forgets" about the intrinsics that are new with Fortran 90:
> 
> % /usr/test/bin/g77 -ff90-intrinsics-delete beinum.f
> /bin/ld: Undefined symbols:
> _matmul_
> collect2: ld returned 1 exit status
> 
> IOW, it seems to work as designed - note that in both cases, the  
> compiler *will* generate a reference to an external symbol.
> 
> Met vriendelijke groet,
> Toon.

I don't know what kind of problems the original author had, but the
-fgnu-intrinsics-* and -fbadu77-intrinsics-* are absent from
gcc/f/lang-options.h since g77 0.5.21. At least for this reason this file
should be patched.



More information about the Gcc-bugs mailing list