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]
Other format: [Raw text]

[3.3 branch, trunk, committed] Fix Fortran/11301.


This fix is a bit of a cop-out.

Richard Hendersons fix of debug/9864 caused programs to fail to compile with -fno-globals supplied as a compiler option.

This fix undoes Richard's change when -fno-globals is in effect. This means that code compiled with g77 -fno-globals will still see the debug/9864 problem, but as said code isn't conformant Fortran anyway, I think we can get away with that. -fno-globals is meant for broken code from the '60's when compilers weren't good enough to detect mismatches between SUBROUTINE definitions and CALL SUBROUTINE uses.

Applied to the 3.3 branch (after bootstrapping and checking C and f77) and mainline.

--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)
2003-07-05  Toon Moene  <toon@moene.indiv.nluug.nl>

	PR Fortran/11301
	* com.c (ffecom_sym_transform_): Only install
	FFEINFO_whereGLOBAL symbols in the global binding
	level if not -fno-globals.

*** com.c.orig	Sat Jul  5 10:27:36 2003
--- com.c	Sat Jul  5 14:18:13 2003
*************** ffecom_sym_transform_ (ffesymbol s)
*** 8092,8096 ****
  	  TREE_PUBLIC (t) = 1;
  
! 	  t = start_decl (t, TRUE);
  	  finish_decl (t, NULL_TREE, TRUE);
  
--- 8092,8096 ----
  	  TREE_PUBLIC (t) = 1;
  
! 	  t = start_decl (t, ffe_is_globals ());
  	  finish_decl (t, NULL_TREE, TRUE);
  

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