]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
com.c (ffecom_init_0): Fix setup of INTEGER(KIND=7) pointer type.
authorCraig Burley <burley@gnu.org>
Thu, 4 Jun 1998 10:41:23 +0000 (06:41 -0400)
committerDave Love <fx@gcc.gnu.org>
Thu, 4 Jun 1998 10:41:23 +0000 (10:41 +0000)
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.

From-SVN: r20225

gcc/f/ChangeLog
gcc/f/com.c
gcc/f/expr.c
gcc/f/g77.texi
gcc/f/global.c
gcc/f/global.h
gcc/f/info.c
gcc/f/news.texi

index b3fcfe4e279b338a6a6a19741dcf130d1d765378..98fdfd748e868632c79b0de46d323fa9dcb2ae62 100644 (file)
@@ -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>
 
index 286d0c7abd3d672e36c30221a88428aa8e57a2ec..4f524288a0ee7e51b499daf1877c3307d6e7da83 100644 (file)
@@ -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. */
index 847904fccbf24618d1e503e8465523774007c00f..e1187808a3b5908d73e7675058a8da3d95726cfc 100644 (file)
@@ -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)
index dfd0c6b408b983578010743314873d49456ac3cd..3d36685aa07e9c741539cadb76f3dd420cc786f8 100644 (file)
@@ -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
index a2251b7eccecf44e5c4a7201f6bf74f2906fc093..932a9d83387d84443aab77031ad6b80f4ba96814 100644 (file)
@@ -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 = "???";
index 70c704df0c56b7fde889db326b87f8dc35cb1fea..d0ac871b71c9e8e1cc24e98f45df7ac86f177a82 100644 (file)
@@ -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;
index 399860e3953290bafa5a98173e8737426ae37d6a..05a6e26c0164274ddb74683e7621459fba8a243c 100644 (file)
@@ -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];
 }
index 7dfa316cae507a06d22d756659b0cbafa6be8a6a..753c861ea2f84ef01428cb1a76c181420968687e 100644 (file)
@@ -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