+Mon May 3 18:11:48 1999 Craig Burley <craig@jcb-sc.com>
+
+ Reverse order of two arguments to CTIME_subr, DTIME_subr,
+ ETIME_subr, and TTYNAM_subr:
+ * com.c (ffecom_expr_intrinsic_): Reverse the arguments.
+ While at it, set TREE_SIDE_EFFECTS for CTIME_subr and
+ TTYNAM_subr.
+ * intdoc.in: Document the new calling sequences.
+ * intrin.def: Reverse the arguments.
+ * news.texi: Document the fact that they changed.
+ * version.c: Bump version.
+
Mon May 3 11:28:14 1999 Craig Burley <craig@jcb-sc.com>
* news.texi: Doc upgrade to netlib libf2c as of today.
tree arg1_tree;
tree arg2_tree;
- arg1_tree = ffecom_arg_ptr_to_expr (arg1, &arg1_len);
+ arg1_tree = ffecom_arg_ptr_to_expr (arg2, &arg1_len);
arg2_tree = convert (((gfrt == FFEINTRIN_impCTIME_subr) ?
ffecom_f2c_longint_type_node :
ffecom_f2c_integer_type_node),
- ffecom_expr (arg2));
+ ffecom_expr (arg1));
arg2_tree = ffecom_1 (ADDR_EXPR,
build_pointer_type (TREE_TYPE (arg2_tree)),
arg2_tree);
arg1_tree,
NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
ffebld_nonter_hook (expr));
+ TREE_SIDE_EFFECTS (expr_tree) = 1;
}
return expr_tree;
case FFEINTRIN_impETIME_subr:
{
tree arg1_tree;
- tree arg2_tree;
+ tree result_tree;
- arg1_tree = ffecom_expr_w (NULL_TREE, arg1);
+ result_tree = ffecom_expr_w (NULL_TREE, arg2);
- arg2_tree = ffecom_ptr_to_expr (arg2);
+ arg1_tree = ffecom_ptr_to_expr (arg1);
expr_tree = ffecom_call_ (ffecom_gfrt_tree_ (gfrt),
ffecom_gfrt_kindtype (gfrt),
FALSE,
NULL_TREE,
- build_tree_list (NULL_TREE, arg2_tree),
+ build_tree_list (NULL_TREE, arg1_tree),
NULL_TREE, NULL, NULL, NULL_TREE,
TRUE,
ffebld_nonter_hook (expr));
- expr_tree = ffecom_modify (NULL_TREE, arg1_tree,
- convert (TREE_TYPE (arg1_tree),
+ expr_tree = ffecom_modify (NULL_TREE, result_tree,
+ convert (TREE_TYPE (result_tree),
expr_tree));
}
return expr_tree;
")
DEFDOC (CTIME_subr, "Convert time to Day Mon dd hh:mm:ss yyyy.", "\
-Converts @var{@2@}, a system time value, such as returned by
+Converts @var{@1@}, a system time value, such as returned by
@code{TIME8()}, to a string of the form @samp{Sat Aug 19 18:13:14 1995},
-and returns that string in @var{@1@}.
+and returns that string in @var{@2@}.
@xref{Time8 Intrinsic}.
DEFDOC (DTIME_subr, "Get elapsed time since last time.", "\
Initially, return the number of seconds of runtime
since the start of the process's execution
-in @var{@1@},
-and the user and system components of this in @samp{@var{@2@}(1)}
-and @samp{@var{@2@}(2)} respectively.
-The value of @var{@1@} is equal to @samp{@var{@2@}(1) + @var{@2@}(2)}.
+in @var{@2@},
+and the user and system components of this in @samp{@var{@1@}(1)}
+and @samp{@var{@1@}(2)} respectively.
+The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
Subsequent invocations of @samp{@0@()} set values based on accumulations
since the previous invocation.
DEFDOC (ETIME_subr, "Get elapsed time for process.", "\
Return the number of seconds of runtime
since the start of the process's execution
-in @var{@1@},
-and the user and system components of this in @samp{@var{@2@}(1)}
-and @samp{@var{@2@}(2)} respectively.
-The value of @var{@1@} is equal to @samp{@var{@2@}(1) + @var{@2@}(2)}.
+in @var{@2@},
+and the user and system components of this in @samp{@var{@1@}(1)}
+and @samp{@var{@1@}(2)} respectively.
+The value of @var{@2@} is equal to @samp{@var{@1@}(1) + @var{@1@}(2)}.
@cindex wraparound, timings
@cindex limits, timings
")
DEFDOC (TTYNAM_subr, "Get name of terminal device for unit.", "\
-Sets @var{@1@} to the name of the terminal device open on logical unit
-@var{@2@} or a blank string if @var{@2@} is not connected to a
+Sets @var{@2@} to the name of the terminal device open on logical unit
+@var{@1@} or to a blank string if @var{@1@} is not connected to a
terminal.
Some non-GNU implementations of Fortran provide this intrinsic as
DEFIMP (COMPLEX, "COMPLEX", ,,, "C=:*:Real=S*,Imag=S*")
DEFIMP (CPU_TIME, "CPU_TIME", SECOND,,, "--:-:Seconds=R*w")
DEFIMP (CTIME_func, "CTIME_func", CTIME,,, "A1*:-:STime=I*")
-DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:Result=A1w,STime=I*")
+DEFIMP (CTIME_subr, "CTIME_subr", CTIME,,, "--:-:STime=I*,Result=A1w")
DEFIMPY (DATE, "DATE", DATE,,, "--:-:Date=A1w", TRUE)
DEFIMP (DATE_AND_TIME, "DATE_AND_TIME", DATE_AND_TIME,,, "--:-:Date=A1w,Time=?A1w,Zone=?A1w,Values=?I1(8)w")
DEFIMP (DBESJ0, "DBESJ0", L_BESJ0,,, "R2:-:X=R2")
DEFIMP (DIMAG, "DIMAG", ,DIMAG,, "R2:-:Z=C2")
DEFIMP (DREAL, "DREAL", ,,, "R2:-:A=N*")
DEFIMP (DTIME_func, "DTIME_func", DTIME,,, "R1:-:TArray=R1(2)w")
-DEFIMP (DTIME_subr, "DTIME_subr", DTIME,,, "--:-:Result=R1w,TArray=R1(2)w")
+DEFIMP (DTIME_subr, "DTIME_subr", DTIME,,, "--:-:TArray=R1(2)w,Result=R1w")
DEFIMP (ERF, "ERF", L_ERF,ERF,, "R=:0:X=R*")
DEFIMP (ERFC, "ERFC", L_ERFC,ERFC,, "R=:0:X=R*")
DEFIMP (ETIME_func, "ETIME_func", ETIME,,, "R1:-:TArray=R1(2)w")
-DEFIMP (ETIME_subr, "ETIME_subr", ETIME,,, "--:-:Result=R1w,TArray=R1(2)w")
+DEFIMP (ETIME_subr, "ETIME_subr", ETIME,,, "--:-:TArray=R1(2)w,Result=R1w")
DEFIMP (EXIT, "EXIT", EXIT,,, "--:-:Status=?I*")
DEFIMP (FDATE_func, "FDATE_func", FDATE,,, "A1*:-:")
DEFIMP (FDATE_subr, "FDATE_subr", FDATE,,, "--:-:Date=A1w")
DEFIMP (TIME_unix, "TIME_unix", TIME,,, "I1:-:")
DEFIMP (TIME_vxt, "TIME_vxt", VXTTIME,,, "--:-:Time=A1[8]w")
DEFIMP (TTYNAM_func, "TTYNAM_func", TTYNAM,,, "A1*:-:Unit=I*")
-DEFIMP (TTYNAM_subr, "TTYNAM_subr", TTYNAM,,, "--:-:Name=A1w,Unit=I*")
+DEFIMP (TTYNAM_subr, "TTYNAM_subr", TTYNAM,,, "--:-:Unit=I*,Name=A1w")
DEFIMP (UMASK_func, "UMASK_func", UMASK,,, "I1:-:Mask=I*")
DEFIMP (UMASK_subr, "UMASK_subr", UMASK,,, "--:-:Mask=I*,Old=?I1w")
DEFIMP (UNLINK_func, "UNLINK_func", UNLINK,,, "I1:-:File=A1")
now are recognized by @code{g77}
as if they ended in @samp{.for} and @samp{.fpp}, respectively.
+@item
+The order of arguments to the @emph{subroutine} forms of the
+@code{CTime}, @code{DTime}, @code{ETime}, and @code{TtyNam}
+intrinsics has been swapped.
+The argument serving as the returned value
+for the corresponding function forms
+now is the @emph{second} argument,
+making these consistent with the other subroutine forms
+of @code{libU77} intrinsics.
+
@item
@code{g77} now warns about a reference to an intrinsic
that has an interface that is not Year 2000 (Y2K) compliant.
-const char *ffe_version_string = "0.5.24-19990502";
+const char *ffe_version_string = "0.5.24-19990503";
+1999-05-03 Craig Burley <craig@jcb-sc.com>
+
+ * g77.f-torture/execute/u77-test.f: Reverse order of two
+ arguments to CTIME_subr, DTIME_subr, ETIME_subr, and TTYNAM_subr.
+
1999-05-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gcc.dg/compare1.c: New test.
bigi = time8 ()
- call ctime (ctim2, i)
+ call ctime (i, ctim2)
if (ctim .ne. ctim2) then
write (6, *) '*** CALL CTIME disagrees with CTIME(): ',
+ ctim2(:lenstr (ctim2)), ' vs. ', ctim(:lenstr (ctim))
line = 'and 6 isn''t a tty device (ISATTY)'
end if
write (6,'(1X,A)') line(:lenstr(line))
- call ttynam (line, 6)
+ call ttynam (6, line)
if (line .ne. line2) then
print *, '*** CALL TTYNAM disagrees with TTYNAM: ',
+ line(:lenstr (line))
do i = 1,1000
do j = 1,1000
end do
- call dtime (r2, tarray2)
+ call dtime (tarray2, r2)
if (tarray2(1) .ne. 0. .or. tarray2(2) .ne. 0.) exit
end do
- call etime (r1, tarray1)
+ call etime (tarray1, r1)
if (.not. issum (r1, tarray1(1), tarray1(2))) then
write (6,*) '*** ETIME didn''t return sum of the array: ',
+ r1, ' /= ', tarray1(1), '+', tarray1(2)
+1999-05-03 Craig Burley <craig@jcb-sc.com>
+
+ * libU77/u77-test.f: Reverse order of two arguments to
+ CTIME_subr, DTIME_subr, ETIME_subr, and TTYNAM_subr.
+
Mon May 3 11:21:35 1999 Craig Burley <craig@jcb-sc.com>
* libF77/c_log.c: Cope with partial overlap a la z_log.c.
bigi = time8 ()
- call ctime (ctim2, i)
+ call ctime (i, ctim2)
if (ctim .ne. ctim2) then
write (6, *) '*** CALL CTIME disagrees with CTIME(): ',
+ ctim2(:lenstr (ctim2)), ' vs. ', ctim(:lenstr (ctim))
line = 'and 6 isn''t a tty device (ISATTY)'
end if
write (6,'(1X,A)') line(:lenstr(line))
- call ttynam (line, 6)
+ call ttynam (6, line)
if (line .ne. line2) then
print *, '*** CALL TTYNAM disagrees with TTYNAM: ',
+ line(:lenstr (line))
do i = 1,1000
do j = 1,1000
end do
- call dtime (r2, tarray2)
+ call dtime (tarray2, r2)
if (tarray2(1) .ne. 0. .or. tarray2(2) .ne. 0.) exit
end do
- call etime (r1, tarray1)
+ call etime (tarray1, r1)
if (.not. issum (r1, tarray1(1), tarray1(2))) then
write (6,*) '*** ETIME didn''t return sum of the array: ',
+ r1, ' /= ', tarray1(1), '+', tarray1(2)