This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28378] New: Intrinsic extensions should be deselectable via command line
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2006 08:37:00 -0000
- Subject: [Bug fortran/28378] New: Intrinsic extensions should be deselectable via command line
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
gfortran has the nasty behavior to fail on completely legal code
that uses subroutines or functions with whose name equals an extension.
g77 had flags to "hide" extensions, but there is no (no documented?)
way to do this with gfortran.
Example:
program gfcbug37
a = second (1.0)
print *, a
end program gfcbug37
function second (minute)
real minute
second = 60 * minute
end function second
leads to:
In file gfcbug37.f90:2
a = second (1.0)
1
Error: Too many arguments in call to 'second' at (1)
I can compile this with gfortran by adding -std=f95 to the
command line for this particular example, but this is not
possible for most other code, in particular legacy code
that is essentially Fortran 77.
If there are flags similar to g77's they should be documented.
An alternative to g77's -f*-intrinsics-* options are those
provided by IBM's xlf:
-qextern=<name1>[:<name2>[: ... [:<namen>]]]
Allows user-written procedures to be called instead
of XL Fortran intrinsics. The suboption is a list
of procedure names separated by colons. The
procedure names are treated as if they appear in an
EXTERNAL statement in each compilation unit being
compiled.
--
Summary: Intrinsic extensions should be deselectable via command
line
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-cygwin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28378