------- Additional Comments From anlauf at hep dot tu-darmstadt dot de 2005-03-01 08:33 ------- (In reply to comment #3) > Read the F2003 standard. > > 5.1.2.8 INTRINSIC attribute > The INTRINSIC attribute confirms that a name is the specific name (13.6) or > generic name (13.5) of an intrinsic procedure.
OK > When you set -std=f95, iargc is not an intrinsic procedure. So, when > you ask gfortran to *confirm* that iargc is an intrinsic procedure, > it tells that it isn't. The default behavior for gfortran is -std=gnu, > which makes iargc an intrinsic procedure. It is OK to reject iargc as an intrinsic procedure in the -std=f95 case during compilation, but the failure during linking when iargc is not specified as an intrinsic isn't. The Intel compiler (v8.1) resolves the problem as follows: - it does not change the name mapping/mangling when -stand=f95 is specified - it maps the recognized intrinsic iargc to for_iargc when it is requested as an intrinsic or not specified as external - it is mangled to iargc_ when specified as external - it provides entry points in the runtime for both iargc_ and for_iargc (disassembling the runtime shows that both have identical code). The version 7.1 of the compiler had the VAX/U*ix intrinsics in a separate portability library. g77 recognized several options to disable special intrinsics. In the case of iargc, g77 -funix-intrinsics-disable does the job. g95 does not recognize this option, and having -std=f95 doing too many things behind my back is counterproductive. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20248