+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
* 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>
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. */
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;
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))
as = FFEGLOBAL_argsummaryPTR;
break;
}
+#endif
/* Fall through. */
default:
if (ffebld_op (item) == FFEBLD_opSYMTER)
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
defwhy = "an alternate-return label";
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
defwhy = "a pointer";
break;
+#endif
default:
defwhy = "???";
}
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
if ((ai->as != FFEGLOBAL_argsummaryPTR)
&& (ai->as != FFEGLOBAL_argsummaryNONE))
refwhy = "a pointer";
}
break;
+#endif
default:
break;
defwhy = "an alternate-return label";
break;
+#if 0
case FFEGLOBAL_argsummaryPTR:
defwhy = "a pointer";
break;
+#endif
default:
defwhy = "???";
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;
{
assert (basictype < FFEINFO_basictype);
assert (kindtype < FFEINFO_kindtype);
- assert (ffeinfo_types_[basictype][kindtype] != NULL);
return ffeinfo_types_[basictype][kindtype];
}
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