[Patch, fortran] PR29284 - [4.1/4.2 Regression] ICE for optional subroutine argument

Bernhard Fischer rep.nop@aon.at
Tue Oct 3 10:22:00 GMT 2006


On Tue, Oct 03, 2006 at 12:42:24AM +0200, Paul Thomas wrote:
>FX,
>
>I believe that the attached answers all the concerns.
>
>It regtests on FC5/Athlon - OK for trunk and 4.1?


>Index: gcc/fortran/trans-expr.c
>===================================================================
>*** gcc/fortran/trans-expr.c	(revision 117347)
>--- gcc/fortran/trans-expr.c	(working copy)
>*************** gfc_conv_function_call (gfc_se * se, gfc
  
>!       if (fsym)
>! 	{
>! 	  if (e)
>! 	    {
>! 	      /* If an optional argument is itself an optional dummy
>! 		 argument, check its presence and substitute a null
>! 		 if absent.  */
>! 	      if (e->expr_type == EXPR_VARIABLE
>! 		    && e->symtree->n.sym->attr.optional
>! 		    && fsym && fsym->attr.optional)

s/&& fsym //

>! 		gfc_conv_missing_dummy (&parmse, e, fsym->ts);



More information about the Fortran mailing list