This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43829] Scalarization of reductions
- From: "paul dot richard dot thomas at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2010 04:27:53 -0000
- Subject: [Bug fortran/43829] Scalarization of reductions
- References: <bug-43829-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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