[Bug fortran/20248] New: gfortran: intrinsics and std=f95, inconsistency with other compilers

anlauf at hep dot tu-darmstadt dot de gcc-bugzilla@gcc.gnu.org
Mon Feb 28 19:23:00 GMT 2005


Hi,

I am having difficulties to understand the following behavior of
gfortran.  Given the code

program iargc_test
implicit none
integer :: iargc
print *, iargc ()
end program iargc_test

and compiling with "gfortran -std=f95", the above program fails to
link, because iargc_ is undefined.

Checking the assembler output, I figured that the problem is related
to a mapping of the names of intrinsics.  Without the option -std=f95
gets mapped to _gfortran_iargc, but in the other case to iargc_ .
No other Fortran compiler that I know of does change the names of
external references based on a language level option.
Neither Intel's ifc/ifort, nor IBM's xlf, nor SGI's f90.

I consider this a surprising and undesirable behavior.  If there are
no convincing precedents in favor of gfortran's implementation, I would
like this behavior either changed, or have a command line option to
disable this feature.

Cheers,
-ha

-- 
           Summary: gfortran: intrinsics and std=f95, inconsistency with
                    other compilers
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at hep dot tu-darmstadt dot de
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20248



More information about the Gcc-bugs mailing list