summaryrefslogtreecommitdiff
path: root/gcc/f
diff options
context:
space:
mode:
authorburley <burley@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-03 16:07:36 +0000
committerburley <burley@138bc75d-0d04-0410-961f-82ee72b054a4>1999-05-03 16:07:36 +0000
commit962b44cd2109140b5f1675af8d9eb1e518e0dc3b (patch)
tree0bccba439be532aedb5a155142134dfc7e74bd0b /gcc/f
parenta68ad8f39f73c6ab60804745501a44363d5b3339 (diff)
downloadgcc-962b44cd2109140b5f1675af8d9eb1e518e0dc3b.tar.gz
reverse order of arguments to CTIME_subr, DTIME_subr, ETIME_subr, and TTYNAM_subr
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26756 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/f')
-rw-r--r--gcc/f/ChangeLog12
-rw-r--r--gcc/f/com.c17
-rw-r--r--gcc/f/intdoc.in24
-rw-r--r--gcc/f/intrin.def8
-rw-r--r--gcc/f/news.texi10
-rw-r--r--gcc/f/version.c2
6 files changed, 48 insertions, 25 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 7741a538f95..90f7b7e27eb 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,15 @@
+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.
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 3362ef3c0c3..a0f33e6e603 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -5265,12 +5265,12 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
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);
@@ -5289,6 +5289,7 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_tree,
arg1_tree,
NULL_TREE, NULL, NULL, NULL_TREE, TRUE,
ffebld_nonter_hook (expr));
+ TREE_SIDE_EFFECTS (expr_tree) = 1;
}
return expr_tree;
@@ -5382,22 +5383,22 @@ ffecom_expr_intrinsic_ (ffebld expr, tree dest_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;
diff --git a/gcc/f/intdoc.in b/gcc/f/intdoc.in
index 2027c5a4d7a..565b771c4fa 100644
--- a/gcc/f/intdoc.in
+++ b/gcc/f/intdoc.in
@@ -1043,9 +1043,9 @@ and returns that string as the function value.
")
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}.
@@ -1096,10 +1096,10 @@ form is not recommended.
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.
@@ -1140,10 +1140,10 @@ during a single run of the compiled program.
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
@@ -2381,8 +2381,8 @@ terminal.
")
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
diff --git a/gcc/f/intrin.def b/gcc/f/intrin.def
index 9d9626bc7c2..4864abb7ddb 100644
--- a/gcc/f/intrin.def
+++ b/gcc/f/intrin.def
@@ -3237,7 +3237,7 @@ DEFIMP (CHMOD_subr, "CHMOD_subr", CHMOD,,, "--:-:Name=A1,Mode=A1,Status=?I1w")
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")
@@ -3253,11 +3253,11 @@ DEFIMP (DFLOAT, "DFLOAT", ,,, "R2:-:A=I*")
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")
@@ -3348,7 +3348,7 @@ DEFIMP (TIME8, "TIME8", TIME,,, "I2:-:")
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")
diff --git a/gcc/f/news.texi b/gcc/f/news.texi
index b60482f0fcd..73f3c854a96 100644
--- a/gcc/f/news.texi
+++ b/gcc/f/news.texi
@@ -218,6 +218,16 @@ 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.
Also, the @code{libg2c} has been changed to increase the likelihood
diff --git a/gcc/f/version.c b/gcc/f/version.c
index 9914a04510d..95242141ceb 100644
--- a/gcc/f/version.c
+++ b/gcc/f/version.c
@@ -1 +1 @@
-const char *ffe_version_string = "0.5.24-19990502";
+const char *ffe_version_string = "0.5.24-19990503";