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]

Re: G77: patch to bitwise .AND. errors


Hassan Aurag wrote:

>  Here is a patch. Now I'd love if someone knowledgeable took a look at
> it to check if it's crappy, dangerous, erroneous, stupid or what. My
> knowledge of compilators being non-existent, and of coding in general
> very limited.

As far as I can see your patch is correct.  I have applied it [as
attached] to mainline (after make bootstrap C/Fortran and make check on
i686-pc-linux-gnu), which means that it will be in 3.2.

Thanks !

-- 
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
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
2002-05-09  Hassan Aurag  <aurag@cae.com>

	* expr.c (ffeexpr_reduced_ugly2log_): Allow logicals-as-integers
	under -fugly-logint as arguments of .and., .or., .xor.

*** expr.c.orig	Mon Feb  4 22:16:42 2002
--- expr.c	Wed May  8 20:43:15 2002
*************** ffeexpr_reduced_ugly2log_ (ffebld reduce
*** 11502,11505 ****
--- 11502,11523 ----
      }
  
+   if (lbt == FFEINFO_basictypeLOGICAL)
+   {
+ 	  ffebld_set_left (reduced, ffeexpr_convert (ffebld_left (reduced),
+ 				  l->token, op->token, FFEINFO_basictypeINTEGER,
+ 				  FFEINFO_kindtypeINTEGERDEFAULT, 0,
+ 				  FFETARGET_charactersizeNONE,
+ 				  FFEEXPR_contextLET));
+   }
+ 
+   if (rbt == FFEINFO_basictypeLOGICAL)
+   {
+ 	  ffebld_set_right (reduced, ffeexpr_convert (ffebld_right (reduced),
+ 				  r->token, op->token, FFEINFO_basictypeINTEGER,
+ 				  FFEINFO_kindtypeINTEGERDEFAULT, 0,
+ 				  FFETARGET_charactersizeNONE,
+ 				  FFEEXPR_contextLET));
+   }
+   
    return reduced;
  }

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