This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: intrinsic options for g77.
- To: gvb at hermes dot bouw dot tno dot nl (Gerlach van Beinum)
- Subject: Re: intrinsic options for g77.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Thu, 8 Jan 98 15:24:43 +0100
- Cc: egcs-bugs at cygnus dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <9801080652.AA16213@hermes.bouw.tno.nl>
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.