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

--- Comment #3 from pablomme <pablomme at googlemail dot com> 2012-02-22 
03:32:14 UTC ---
> Please define fails.  What is the error message you get?

Namely:

$ gfortran -o t test_etime_iface.f90 
/scratch/pl275/ccyZ7sWC.o: In function `MAIN__':
test_etime_iface.f90:(.text+0x4b): undefined reference to `etime_'
collect2: ld returned 1 exit status

gfortran accepts the inteface but ld fails because the intrinsic has been
obscured by a missing external procedure.

> As it is an intrinsic procedure, etime already has an
> explicit interface.  So, trying to re-specify
> an interface makes no sense.

I don't doubt that gfortran's behaviour may be sensible. The "bug" here is that
it behaves differently from 6 other compilers.

About whether this construction makes sense or not, in our code we use this
explicit interface in order to support optional compilation of a C replacement
for etime for compilers that do not offer the extension. At present, gfortran
requires the C replacement because of this problem, but it shouldn't need it.
No biggie, of course, but it'd be nice to see this consistency.

Reply via email to