[patch, fortran] Fix character length in constructors

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Feb 19 22:51:00 GMT 2018


On Mon, Feb 19, 2018 at 11:41:30PM +0100, Thomas Koenig wrote:
> 
> Regression-tested. OK for trunk?
> 

OK with the fix suggested below.


> Index: primary.c
> ===================================================================
> --- primary.c	(Revision 257788)
> +++ primary.c	(Arbeitskopie)
> @@ -2879,6 +2879,38 @@ gfc_convert_to_structure_constructor (gfc_expr *e,
>        if (!this_comp)
>  	goto cleanup;
>  
> +      /* For a constant string constructor, make sure the length is correct;
> +	 truncate of fill with blanks if needed.  */

truncate or fill

-- 
Steve



More information about the Fortran mailing list