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

--- Comment #4 from pablomme <pablomme at googlemail dot com> 2012-02-22 
03:40:12 UTC ---
Adding "EXTERNAL etime" to the program gives:

--
$ gfortran -o t test_etime_iface.f90 
test_etime_iface.f90:9.15:

 EXTERNAL etime
               1
Error: Duplicate EXTERNAL attribute specified at (1)

$ ifort -o t test_etime_iface.f90 
test_etime_iface.f90(9): error #6409: This name has already been used as an
external procedure name.   [ETIME]
 EXTERNAL etime
----------^
compilation aborted for test_etime_iface.f90 (code 1)
--

Then adding "INTRINSIC etime" gives:

--
$ gfortran -o t test_etime_iface.f90 
test_etime_iface.f90:9.16:

 INTRINSIC etime
                1
Error: EXTERNAL attribute conflicts with INTRINSIC attribute at (1)

$ ifort -o t test_etime_iface.f90 
test_etime_iface.f90(9): error #6409: This name has already been used as an
external procedure name.   [ETIME]
 INTRINSIC etime
-----------^
compilation aborted for test_etime_iface.f90 (code 1)
--

So ifort seems to agree with gfortran in its error messages that providing an
explicit interface to a function implies that the function is EXTERNAL, and
that INTRINSIC is incompatible with EXTERNAL. This seems inconsistent with its
using the intrinsic version if etime when an explicit interface is present, but
there you go..

Reply via email to