[PATCH] Fix --enable-checking=valgrind failure on eoshift_2.f90 (PR fortran/43030)

Tobias Burnus burnus@net-b.de
Thu Feb 11 19:00:00 GMT 2010


On 02/11/2010 07:56 PM, Jakub Jelinek wrote:
> As mentioned in the PR, we forget to clear most of the typespec fields,
> which leads to conditional jumps based on uninitialized value.
>
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux.
> Ok for trunk/4.4?
>   
The patch is OK. Thanks for also fixing PR 43022 (now duplicated).

Tobias

> 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
>
> 	PR fortran/43030
> 	* resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
>
> --- gcc/fortran/resolve.c.jj	2010-02-09 19:17:05.000000000 +0100
> +++ gcc/fortran/resolve.c	2010-02-11 11:44:01.000000000 +0100
> @@ -3958,6 +3958,7 @@ gfc_resolve_dim_arg (gfc_expr *dim)
>      {
>        gfc_typespec ts;
>  
> +      gfc_clear_ts (&ts);
>        ts.type = BT_INTEGER;
>        ts.kind = gfc_index_integer_kind;
>  
>
> 	Jakub
>
>   



More information about the Gcc-patches mailing list