[Bug fortran/43829] Scalarization of reductions
paul dot richard dot thomas at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Jun 28 04:28:00 GMT 2010
------- 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
More information about the Gcc-bugs
mailing list