1 Jan 20:18
Re: [fortran-dev] constructor work, part I and II, updated
Daniel Franke <franke.daniel <at> gmail.com>
2010-01-01 19:18:34 GMT
2010-01-01 19:18:34 GMT
On Wednesday 30 December 2009 07:34:36 Daniel Franke wrote:
> As the initial patch and the update did not get a formal review yet, I
> continued to work on it. Here's the whole of (a), (b) and (c) in one big
> changeset. It bootstraps and regtests fine up to one regression where I'm
> not sure it's a real regression or not a latent bug uncovered by the
> changes (char_component_initializer_1.f90). Either way, I didn't manage
> yet to get rid of it yet. There are also issues with this testcase in
> trunk as well (see PR42526).
Please find an updated version of the patch attached.
There are four changes:
1. Update decl.c (add_init_expr_to_sym) to use init as first value, as
Tobias S. mentioned this may lead to problems otherwise. This now reads:
+ gfc_constructor_append_expr (&array->value.constructor,
+ n == 0
+ ? init
+ : gfc_copy_expr (init),
+ &init->where);
+
2. removed a piece of junk code that was left over from reg-hunting
3. fixed the last regresssion on char_component_initializer_1.f90
The relevant section for both changes in decl.c (build_struct) now reads:
- for (; ctor; ctor = ctor->next)
+ for ( ; ctor; ctor = gfc_constructor_next (ctor))
+ if (ctor->expr->expr_type == EXPR_CONSTANT)
{
(Continue reading)
>
> cheers,
> DaveK
>
I have svn moveed it to fortran-exp. I egret my eeror. :)
Jerry
RSS Feed