[Patch, gfortran] PR16511 - Test 19990905-0.f fails with gfortran

Tobias.Schlueter@Physik.Uni-Muenchen.DE Tobias.Schlueter@Physik.Uni-Muenchen.DE
Thu Aug 18 20:16:00 GMT 2005


:REVIEWURL http://gcc.gnu.org/ml/gcc-patches/2005-08/msg01072.html:

(Sorry for the broken threading, my mail server chose to work perfectly fine for
receiving mail, but doesn't let me authenticate for sending, even though the
web interface works perfectly fine. Sigh.)

Paul Thomas wrote:
> 2005-08-17  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/16511
> 	* match.c (gfc_match_common, gfc_match_equivalence): Ensure that
> 	symbols that are equivalence associated with a common block are
> 	marked as being in_common.
>
>
> 2005-08-17  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/16511
> 	* gfortran.dg/g77/19990905-0.f: Remove XFAIL and add comment to
> 	connect the test with the PR.

I think it would be even better to introduce an 'is_equivalenced' flag in the
symbol_attribute structure, and set this in match_equivalence, exactly the same
way this is done for in_common in match_common.  You would then only have to
scan the equivalences if oyu know that a symbol is equivalenced.

> + 	      /* Check to see if the symbol is already in an equivalence group.
> + 	         If it is, set the other members as being in common.  */
> + 	      for (e1 = gfc_current_ns->equiv; e1; e1 = e1->next)
> + 		{
> + 		  equiv_flag = false;
> + 		  for (e2 = e1; e2; e2 = e2->eq)
> + 		    if (e2->expr->symtree->n.sym == sym)
> + 		      {
> + 			equiv_flag = true;
> + 			continue;
                        ^^^^^^^^ should be break;

except for that this is ok.

- Tobi




More information about the Gcc-patches mailing list