PR33727 - Segfault with ugly string array constructor
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Thu Oct 11 07:27:00 GMT 2007
Hi Paul,
Paul Richard Thomas wrote:
> The cause of this PR is a typo in trans-array.c(get_array_ctor_var_strlen).
>
> Index: gcc/fortran/trans-array.c
> ===================================================================
> *** gcc/fortran/trans-array.c (révision 129121)
> --- gcc/fortran/trans-array.c (copie de travail)
> *************** get_array_ctor_var_strlen (gfc_expr * ex
> *** 1340,1346 ****
>
> case REF_SUBSTRING:
> if (ref->u.ss.start->expr_type != EXPR_CONSTANT
> ! || ref->u.ss.start->expr_type != EXPR_CONSTANT)
> break;
> mpz_init_set_ui (char_len, 1);
> mpz_add (char_len, char_len, ref->u.ss.end->value.integer);
> --- 1340,1346 ----
>
> case REF_SUBSTRING:
> if (ref->u.ss.start->expr_type != EXPR_CONSTANT
> ! || ref->u.ss.end->expr_type != EXPR_CONSTANT)
> break;
> mpz_init_set_ui (char_len, 1);
> mpz_add (char_len, char_len, ref->u.ss.end->value.integer);
>
> I'm struggling to find the time to get some other patches out of the
> door. If you want to fix this one, please go ahead and do so.
Thanks, I'll take care of this.
Cheers,
- Tobi
More information about the Fortran
mailing list