This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43829] Scalarization of reductions



------- Comment #25 from paul dot richard dot thomas at gmail dot com  2010-06-28 04:27 -------
Subject: Re:  Scalarization of reductions

Dear Mikael,

> - ? ? ? ? gfc_find_sym_tree (name, gfc_current_ns, 0, &st);
> - ? ? ? ? st->n.sym = *result;
> ? ? ? ? ?st = gfc_get_unique_symtree (gfc_current_ns);
> - ? ? ? ? st->n.sym = sym;
> + ? ? ? ? gfc_assign_symbol (&st->n.sym, sym);
> + ? ? ? ? gfc_find_sym_tree (name, gfc_current_ns, 0, &st);
> + ? ? ? ? gfc_assign_symbol (&st->n.sym, *result);
> ? ? ? ?}
> ? ? }
> ? else
>
> i.e. the two symbol assignments are exchanged so that the symbol is not deleted
> between them.

...snip...

> - ?return vtab;
> + ?found_sym = vtab;
> +
> +cleanup:
> + ?/* It is unexpected to have some symbols added at resolution or code
> + ? ? generation time. We commit the changes in order to keep a clean state.
> */
> + ?if (found_sym)
> + ? ?gfc_commit_symbols ();
> + ?else
> + ? ?gfc_undo_symbols ();
> +
> + ?return found_sym;
> ?}

I have been round long enough that I should have remembered all of this :-(

Thanks!

Paul


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]