This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Undo earlier g77 patch


Jeff, could you apply this to both trunks (main and 1.1)?  It undoes
an earlier patch that resulted from discussions as to how to work
around a back-end change that itself was recently undone -- in the
meantime, while wondering why I was seeing certain differences in
assembler output, I discovered the g77 patch was never really right
in the first place (though, I can't easily prove it with a test case
-- I tried).

Since applying this patch restores g77 to the way it's worked in
basically all FSF releases and in egcs 1.0.x, I'm quite sure
that applying it won't break anything...moreso than I am that
*not* applying it won't!  (At the very least, if we don't apply
this patch, i.e. leave the earlier patch in effect, g77 generates
spurious warnings about statement-function definitions being
unused when, in fact, they are indeed used.)

        tq vm, (burley)


Thu Jul 16 13:26:36 1998  Craig Burley  <burley@gnu.org>

	* (ffecom_finish_symbol_transform_): Revert change
	of 1998-05-23, as it was too aggressive, in that it
	prevented transformation of (used) functions before
	primary code generation.


*** g77-e/gcc/f/com.c.~1~	Mon Jul 13 08:11:41 1998
--- g77-e/gcc/f/com.c	Thu Jul 16 13:35:52 1998
*************** ffecom_finish_symbol_transform_ (ffesymb
*** 6716,6748 ****
    if (ffesymbol_hook (s).decl_tree == NULL_TREE)
      {
!       if (ffesymbol_where (s) == FFEINFO_whereCONSTANT
! 	  && (ffesymbol_kind (s) == FFEINFO_kindFUNCTION
! 	      || ffesymbol_kind (s) == FFEINFO_kindSUBROUTINE))
! 	{
! 	  /* An unreferenced statement function.  If this refers to
! 	     an undeclared array, it'll look like a reference to
! 	     an external function that might not exist.  Even if it
! 	     does refer to an non-existent function, it seems silly
! 	     to force a linker error when the function won't actually
! 	     be called.  But before the 1998-05-15 change to egcs/gcc
! 	     toplev.c by Mark Mitchell, to fix other problems, this
! 	     didn't actually happen, since gcc would defer nested
! 	     functions to be compiled later only if needed.  With that
! 	     change, it makes sense to simply avoid telling the back
! 	     end about the statement (nested) function at all.  But
! 	     if -Wunused is specified, might as well warn about it.  */
! 
! 	  if (warn_unused)
! 	    {
! 	      ffebad_start (FFEBAD_SFUNC_UNUSED);
! 	      ffebad_string (ffesymbol_text (s));
! 	      ffebad_here (0, ffesymbol_where_line (s), ffesymbol_where_column (s));
! 	      ffebad_finish ();
! 	    }
! 	}
!       else if (ffesymbol_kind (s) != FFEINFO_kindNONE
! 	       || (ffesymbol_where (s) != FFEINFO_whereNONE
! 		   && ffesymbol_where (s) != FFEINFO_whereINTRINSIC
! 		   && ffesymbol_where (s) != FFEINFO_whereDUMMY))
  	/* Not transformed, and not CHARACTER*(*), and not a dummy
  	   argument, which can happen only if the entry point names
--- 6716,6723 ----
    if (ffesymbol_hook (s).decl_tree == NULL_TREE)
      {
!       if (ffesymbol_kind (s) != FFEINFO_kindNONE
! 	  || (ffesymbol_where (s) != FFEINFO_whereNONE
! 	      && ffesymbol_where (s) != FFEINFO_whereINTRINSIC
! 	      && ffesymbol_where (s) != FFEINFO_whereDUMMY))
  	/* Not transformed, and not CHARACTER*(*), and not a dummy
  	   argument, which can happen only if the entry point names
*** g77-e/gcc/f/version.c.~1~	Sun Jul 12 00:52:27 1998
--- g77-e/gcc/f/version.c	Thu Jul 16 13:36:12 1998
***************
*** 1 ****
! char *ffe_version_string = "0.5.24-19980711";
--- 1 ----
! char *ffe_version_string = "0.5.24-19980715";


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]