This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] Implementation SYSTEM_CLOCK intrinsic subroutine


Steve Kargl wrote:
   program a          ! system_clock requires at least 1 of its
   call system_clock  ! optional arguments to be present.
   end program a


I don't see that this is true. The standard says that each of these arguments are optional, and there is no constraint that one be present, as in the case of SELECTED_REAL_KIND for instance. Of course the call doesn't make much sense if no arguments are given.


In case I'm mistaken:

+try
+gfc_check_system_clock (gfc_expr * count, gfc_expr * count_rate,
+                        gfc_expr * count_max)
+{
+

gfc_check_selected_real_kind does this at the beginning of the function: if (p == NULL && r == NULL) { gfc_error ("Missing arguments to %s intrinsic at %L", gfc_current_intrinsic, gfc_current_intrinsic_where);

      return FAILURE;
    }

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]