aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/f/ChangeLog13
-rw-r--r--gcc/f/com.c5
-rw-r--r--gcc/f/expr.c8
-rw-r--r--gcc/f/g77.texi9
-rw-r--r--gcc/f/global.c6
-rw-r--r--gcc/f/global.h1
-rw-r--r--gcc/f/info.c1
-rw-r--r--gcc/f/news.texi24
8 files changed, 58 insertions, 9 deletions
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index b3fcfe4..98fdfd7 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,3 +1,13 @@
+Mon Jun 1 19:37:42 1998 Craig Burley <burley@gnu.org>
+
+ * com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7)
+ pointer type.
+ * info.c (ffeinfo_type): Don't crash on null type.
+ * expr.c (ffeexpr_fulfill_call_): Don't special-case
+ %LOC(expr) or LOC(expr).
+ Delete FFEGLOBAL_argsummaryPTR.
+ * global.c, global.h: Delete FFEGLOBAL_argsummaryPTR.
+
Mon May 25 03:34:42 1998 Craig Burley <burley@gnu.org>
* com.c (ffecom_expr_): Fix D**I and Z**I cases to
@@ -9,7 +19,8 @@ Sat May 23 06:32:52 1998 Craig Burley <burley@gnu.org>
* com.c (ffecom_finish_symbol_transform_): Don't transform
statement (nested) functions, to avoid gcc compiling them
and thus producing linker errors if they refer to undefined
- exteral functions. But warn if they're unused and -Wunused.
+ external functions. But warn if they're unused and -Wunused.
+ * bad.def (FFEBAD_SFUNC_UNUSED): New diagnostic.
Tue May 19 14:52:41 1998 Craig Burley <burley@gnu.org>
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 286d0c7..4f52428 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -12351,10 +12351,11 @@ ffecom_init_0 ()
fatal ("no INTEGER type can hold a pointer on this configuration");
else if (0 && ffe_is_do_internal_checks ())
fprintf (stderr, "Pointer type kt=%d\n", ffecom_pointer_kind_);
- type = ffetype_new ();
ffetype_set_kind (ffeinfo_type (FFEINFO_basictypeINTEGER,
FFEINFO_kindtypeINTEGERDEFAULT),
- 7, type);
+ 7,
+ ffeinfo_type (FFEINFO_basictypeINTEGER,
+ ffecom_pointer_kind_));
if (ffe_is_ugly_assign ())
ffecom_label_kind_ = ffecom_pointer_kind_; /* Require ASSIGN etc to this. */
diff --git a/gcc/f/expr.c b/gcc/f/expr.c
index 847904f..e118780 100644
--- a/gcc/f/expr.c
+++ b/gcc/f/expr.c
@@ -9385,9 +9385,13 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
as = FFEGLOBAL_argsummaryALTRTN;
break;
+#if 0
+ /* No, %LOC(foo) is just like any INTEGER(KIND=7)
+ expression, so don't treat it specially. */
case FFEBLD_opPERCENT_LOC:
as = FFEGLOBAL_argsummaryPTR;
break;
+#endif
case FFEBLD_opPERCENT_VAL:
as = FFEGLOBAL_argsummaryVAL;
@@ -9402,6 +9406,9 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
break;
case FFEBLD_opFUNCREF:
+#if 0
+ /* No, LOC(foo) is just like any INTEGER(KIND=7)
+ expression, so don't treat it specially. */
if ((ffebld_op (ffebld_left (item)) == FFEBLD_opSYMTER)
&& (ffesymbol_specific (ffebld_symter (ffebld_left (item)))
== FFEINTRIN_specLOC))
@@ -9409,6 +9416,7 @@ ffeexpr_fulfill_call_ (ffebld *expr, ffelexToken t)
as = FFEGLOBAL_argsummaryPTR;
break;
}
+#endif
/* Fall through. */
default:
if (ffebld_op (item) == FFEBLD_opSYMTER)
diff --git a/gcc/f/g77.texi b/gcc/f/g77.texi
index dfd0c6b..3d36685 100644
--- a/gcc/f/g77.texi
+++ b/gcc/f/g77.texi
@@ -5409,16 +5409,17 @@ arguments (those not passed using a construct such as @code{%VAL()})
by reference or descriptor, depending on the type of
the actual argument.
Thus, given @samp{INTEGER I}, @samp{CALL FOO(I)} would
-seem to mean the same thing as @samp{CALL FOO(%LOC(I))}, and
+seem to mean the same thing as @samp{CALL FOO(%VAL(%LOC(I)))}, and
in fact might compile to identical code.
-However, @samp{CALL FOO(%LOC(I))} emphatically means ``pass the
-address of @samp{I} in memory''.
+However, @samp{CALL FOO(%VAL(%LOC(I)))} emphatically means
+``pass, by value, the address of @samp{I} in memory''.
While @samp{CALL FOO(I)} might use that same approach in a
particular version of @code{g77}, another version or compiler
might choose a different implementation, such as copy-in/copy-out,
to effect the desired behavior---and which will therefore not
-necessarily compile to the same code as would @samp{CALL FOO(%LOC(I))}
+necessarily compile to the same code as would
+@samp{CALL FOO(%VAL(%LOC(I)))}
using the same version or compiler.
@xref{Debugging and Interfacing}, for detailed information on
diff --git a/gcc/f/global.c b/gcc/f/global.c
index a2251b7e..932a9d8 100644
--- a/gcc/f/global.c
+++ b/gcc/f/global.c
@@ -616,9 +616,11 @@ ffeglobal_proc_def_arg (ffesymbol s, int argno, char *name, ffeglobalArgSummary
defwhy = "an alternate-return label";
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
defwhy = "a pointer";
break;
+#endif
default:
defwhy = "???";
@@ -868,6 +870,7 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
}
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
if ((ai->as != FFEGLOBAL_argsummaryPTR)
&& (ai->as != FFEGLOBAL_argsummaryNONE))
@@ -876,6 +879,7 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
refwhy = "a pointer";
}
break;
+#endif
default:
break;
@@ -919,9 +923,11 @@ ffeglobal_proc_ref_arg (ffesymbol s, int argno, ffeglobalArgSummary as,
defwhy = "an alternate-return label";
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
defwhy = "a pointer";
break;
+#endif
default:
defwhy = "???";
diff --git a/gcc/f/global.h b/gcc/f/global.h
index 70c704d..d0ac871 100644
--- a/gcc/f/global.h
+++ b/gcc/f/global.h
@@ -55,7 +55,6 @@ typedef enum
FFEGLOBAL_argsummarySUBR, /* Subroutine (intrinsic, external). */
FFEGLOBAL_argsummaryFUNC, /* Function (intrinsic, external). */
FFEGLOBAL_argsummaryALTRTN, /* Alternate-return (label). */
- FFEGLOBAL_argsummaryPTR, /* Pointer (%LOC, LOC()). */
FFEGLOBAL_argsummaryANY,
FFEGLOBAL_argsummary
} ffeglobalArgSummary;
diff --git a/gcc/f/info.c b/gcc/f/info.c
index 399860e..05a6e26 100644
--- a/gcc/f/info.c
+++ b/gcc/f/info.c
@@ -256,7 +256,6 @@ ffeinfo_type (ffeinfoBasictype basictype, ffeinfoKindtype kindtype)
{
assert (basictype < FFEINFO_basictype);
assert (kindtype < FFEINFO_kindtype);
- assert (ffeinfo_types_[basictype][kindtype] != NULL);
return ffeinfo_types_[basictype][kindtype];
}
diff --git a/gcc/f/news.texi b/gcc/f/news.texi
index 7dfa316..753c861 100644
--- a/gcc/f/news.texi
+++ b/gcc/f/news.texi
@@ -46,6 +46,30 @@ Miscellany
This order is not strict---for example, some items
involve a combination of these elements.
+@heading In 0.5.24:
+@itemize @bullet
+@item
+@code{g77} no longer crashes when compiling code
+containing specification statements such as
+@samp{INTEGER(KIND=7) PTR}.
+
+@item
+@code{g77} now treats @samp{%LOC(@var{expr})} and
+@samp{LOC(@var{expr})} as ``ordinary'' expressions
+when they are used as arguments in procedure calls.
+This change applies only to global (filewide) analysis,
+making it consistent with
+how @code{g77} actually generates code
+for these cases.
+
+Previously, @code{g77} treated these expressions
+as denoting special ``pointer'' arguments
+for the purposes of filewide analysis.
+
+@item
+Improve documentation and indexing.
+@end itemize
+
@heading In 0.5.23:
@itemize @bullet
@item