public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mikael at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/43829] Scalarization of reductions Date: Sun, 27 Jun 2010 12:50:00 -0000 [thread overview] Message-ID: <20100627125021.17289.qmail@sourceware.org> (raw) In-Reply-To: <bug-43829-10053@http.gcc.gnu.org/bugzilla/> ------- Comment #20 from mikael at gcc dot gnu dot org 2010-06-27 12:50 ------- (In reply to comment #17) > With the patch in comment #13 I get the following failures: > > > FAIL: gfortran.dg/entry_10.f90 -O0 (internal compiler error) > ... > FAIL: gfortran.dg/entry_13.f90 -O0 (internal compiler error) > ... > FAIL: gfortran.dg/entry_16.f90 -O0 (internal compiler error) Fixed. For info the relevant hunk is : diff --git a/decl.c b/decl.c index aa7a266..d062433 100644 --- a/decl.c +++ b/decl.c @@ -840,10 +850,10 @@ get_proc_name (const char *name, gfc_symbol **result, bool module_fcn_entry) can be applied. */ (*result)->ns = gfc_current_ns; - 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. > > I have also a dozen ICEs in my favorite can of worms, for instance with > > > module grid_module > implicit none > type grid > end type > type field > type(grid) :: mesh > end type > contains > real function return_x(this) > class(grid) :: this > end function > end module > > module field_module > use grid_module, only: field,return_x > implicit none > contains > subroutine output(this) > class(field) :: this > print *,return_x(this%mesh) > end subroutine > end module > > There was a missing "end" statement to make it fail. Fixed, for info the relevant part is the change in gfc_find_symbol_vtab, espcially this hunk: diff --git a/class.c b/class.c index 37b9cf0..11af809 100644 --- a/class.c +++ b/class.c @@ -641,7 +730,17 @@ gfc_find_derived_vtab (gfc_symbol *derived, bool resolved) add_generics_to_declared_vtab (derived, vtab->ts.u.derived, derived, resolved); - 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; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829
next prev parent reply other threads:[~2010-06-27 12:50 UTC|newest] Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-04-21 12:24 [Bug fortran/43829] New: " rguenth at gcc dot gnu dot org 2010-04-21 12:52 ` [Bug fortran/43829] Scalarization of reductions with Fortran array expressions steven at gcc dot gnu dot org 2010-04-21 13:08 ` [Bug fortran/43829] Scalarization of reductions rguenth at gcc dot gnu dot org 2010-04-21 14:27 ` rguenth at gcc dot gnu dot org 2010-04-22 8:35 ` rguenth at gcc dot gnu dot org 2010-04-22 14:00 ` rguenth at gcc dot gnu dot org 2010-04-22 15:40 ` rguenth at gcc dot gnu dot org 2010-04-23 16:09 ` rguenth at gcc dot gnu dot org 2010-05-04 23:08 ` mikael at gcc dot gnu dot org 2010-05-05 5:08 ` pault at gcc dot gnu dot org 2010-05-05 15:44 ` rguenth at gcc dot gnu dot org 2010-05-22 19:36 ` mikael at gcc dot gnu dot org 2010-06-25 9:28 ` mikael at gcc dot gnu dot org 2010-06-25 9:34 ` mikael at gcc dot gnu dot org 2010-06-25 9:37 ` mikael at gcc dot gnu dot org 2010-06-25 9:42 ` mikael at gcc dot gnu dot org 2010-06-25 9:45 ` rguenther at suse dot de 2010-06-25 22:09 ` dominiq at lps dot ens dot fr 2010-06-26 9:06 ` mikael at gcc dot gnu dot org 2010-06-27 12:42 ` mikael at gcc dot gnu dot org 2010-06-27 12:50 ` mikael at gcc dot gnu dot org [this message] 2010-06-27 19:20 ` dominiq at lps dot ens dot fr 2010-06-27 19:45 ` burnus at gcc dot gnu dot org 2010-06-27 20:05 ` dominiq at lps dot ens dot fr 2010-06-27 21:30 ` dominiq at lps dot ens dot fr 2010-06-28 4:28 ` paul dot richard dot thomas at gmail dot com 2010-06-28 9:36 ` rguenth at gcc dot gnu dot org 2010-09-08 11:29 ` dominiq at lps dot ens dot fr 2010-09-08 17:21 ` mikael at gcc dot gnu dot org 2010-09-13 9:09 ` dominiq at lps dot ens dot fr 2010-09-13 17:10 ` mikael at gcc dot gnu dot org [not found] <bug-43829-4@http.gcc.gnu.org/bugzilla/> 2011-02-07 18:53 ` mikael at gcc dot gnu.org 2011-02-07 18:58 ` mikael at gcc dot gnu.org 2011-03-01 15:41 ` dominiq at lps dot ens.fr 2011-03-04 23:15 ` mikael at gcc dot gnu.org 2011-10-04 13:18 ` matz at gcc dot gnu.org 2011-10-04 16:05 ` paul.richard.thomas at gmail dot com 2011-10-04 21:57 ` mikael at gcc dot gnu.org 2011-10-05 6:41 ` paul.richard.thomas at gmail dot com 2011-10-05 14:11 ` burnus at gcc dot gnu.org 2011-10-05 18:12 ` mikael at gcc dot gnu.org 2011-10-08 16:28 ` mikael at gcc dot gnu.org 2011-10-08 16:31 ` mikael at gcc dot gnu.org 2011-10-08 17:58 ` mikael at gcc dot gnu.org 2011-10-09 9:48 ` paul.richard.thomas at gmail dot com 2011-10-09 16:02 ` dominiq at lps dot ens.fr 2011-10-09 16:45 ` mikael at gcc dot gnu.org 2011-10-10 9:06 ` rguenther at suse dot de 2011-11-04 0:31 ` mikael at gcc dot gnu.org 2011-11-04 0:46 ` mikael at gcc dot gnu.org 2011-11-04 1:08 ` mikael at gcc dot gnu.org 2011-11-04 1:11 ` mikael at gcc dot gnu.org 2011-11-26 6:51 ` mikael at gcc dot gnu.org 2012-03-04 19:14 ` mikael at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100627125021.17289.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).