This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
GO TO accepted when using g77 -ffree-form as of 3.4
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: gcc-patches at gcc dot gnu dot org
- Cc: bdavis9659 at comcast dot net, sbrozell at scripps dot edu
- Date: Sat, 31 May 2003 22:09:36 +0200
- Subject: GO TO accepted when using g77 -ffree-form as of 3.4
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
Scott,
Bud Davis fixed the problem with g77 not accepting GO TO when compiling
free form source code. The attached patch is the fix.
Bootstrapped (C and Fortran) and make -k check on
powerpc-unknown-linux-gnu; fixed the now passing test case.
Thanks Bud !
--
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-05-31 Bud Davis <bdavis9659@comcast.net>
PR fortran/10843
* sta.c (ffesta_second_): Parse GO TO correctly,
even in free source format.
*** sta.c.orig Thu Oct 18 00:34:52 2001
--- sta.c Sat May 31 19:41:01 2003
***************
*** 1,4 ****
/* sta.c -- Implementation File (module.c template V1.0)
! Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
Contributed by James Craig Burley.
--- 1,4 ----
/* sta.c -- Implementation File (module.c template V1.0)
! Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
Contributed by James Craig Burley.
*************** ffesta_second_ (ffelexToken t)
*** 955,958 ****
--- 955,974 ----
break;
+ case FFESTR_firstGO:
+ if ((ffelex_token_type (ffesta_token_0_) == FFELEX_typeNAMES)
+ || (ffelex_token_type (t) != FFELEX_typeNAME))
+ ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto);
+ else
+ switch (ffesta_second_kw)
+ {
+ case FFESTR_secondTO:
+ ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto);
+ break;
+ default:
+ ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto);
+ break;
+ }
+ break;
+
case FFESTR_firstGOTO:
ffesta_add_possible_exec_ ((ffelexHandler) ffestb_goto);