public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/106050] ICE in reject_statement, at fortran/parse.cc:2879 since r8-3056-g5bab4c9631c478b7
Date: Thu, 13 Jul 2023 19:24:32 +0000	[thread overview]
Message-ID: <bug-106050-4-uJO6DRVjcT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106050-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106050

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mikael Morin <mikael@gcc.gnu.org>:

https://gcc.gnu.org/g:616a101848bfd5b61ffdd87ae9b1153139d916ca

commit r14-2507-g616a101848bfd5b61ffdd87ae9b1153139d916ca
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Thu Jul 13 21:23:44 2023 +0200

    fortran: Release symbols in reversed order [PR106050]

    Release symbols in reversed order wrt the order they were allocated.
    This fixes an error recovery ICE in the case of a misplaced
    derived type declaration.  Such a declaration creates nested
    symbols, one for the derived type and one for each type parameter,
    which should be immediately released as the declaration is
    rejected.  This breaks if the derived type is released first.
    As the type parameter symbols are in the namespace of the derived
    type, releasing the derived type releases the type parameters, so
    one can't access them after that, even to release them.  Hence,
    the type parameters should be released first.

            PR fortran/106050

    gcc/fortran/ChangeLog:

            * symbol.cc (gfc_restore_last_undo_checkpoint): Release symbols
            in reverse order.

    gcc/testsuite/ChangeLog:

            * gfortran.dg/pdt_33.f90: New test.

  parent reply	other threads:[~2023-07-13 19:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 18:53 [Bug fortran/106050] New: ICE in reject_statement, at fortran/parse.cc:2879 gscfq@t-online.de
2022-06-21 20:47 ` [Bug fortran/106050] " kargl at gcc dot gnu.org
2022-06-27  8:48 ` [Bug fortran/106050] ICE in reject_statement, at fortran/parse.cc:2879 since r8-3056-g5bab4c9631c478b7 marxin at gcc dot gnu.org
2023-06-06 19:18 ` kargl at gcc dot gnu.org
2023-07-10 16:20 ` pault at gcc dot gnu.org
2023-07-10 16:29 ` pault at gcc dot gnu.org
2023-07-10 18:15 ` mikael at gcc dot gnu.org
2023-07-11 11:24 ` mikael at gcc dot gnu.org
2023-07-11 11:43 ` pault at gcc dot gnu.org
2023-07-13 19:24 ` cvs-commit at gcc dot gnu.org [this message]
2023-09-12  8:36 ` mikael at gcc dot gnu.org
2023-09-15 17:24 ` 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=bug-106050-4-uJO6DRVjcT@http.gcc.gnu.org/bugzilla/ \
    --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: link
Be 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).