public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/PR104648-fix-checking-ICE)] Fix error recovery in toplev::finalize.
Date: Mon, 28 Feb 2022 10:59:09 +0000 (GMT)	[thread overview]
Message-ID: <20220228105910.00A483858435@sourceware.org> (raw)

https://gcc.gnu.org/g:9507a1d30382cebce05f6bea2eb5d08c6390d950

commit 9507a1d30382cebce05f6bea2eb5d08c6390d950
Author: Martin Liska <mliska@suse.cz>
Date:   Mon Feb 28 11:58:01 2022 +0100

    Fix error recovery in toplev::finalize.
    
            PR ipa/104648
    
    gcc/ChangeLog:
    
            * main.cc (main): Use flag_checking instead of CHECKING_P
            and run toplev::finalize only if there is not error seen.

Diff:
---
 gcc/main.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/main.cc b/gcc/main.cc
index f9dd6b2af58..4ba28b7de53 100644
--- a/gcc/main.cc
+++ b/gcc/main.cc
@@ -37,9 +37,9 @@ main (int argc, char **argv)
 		 true /* init_signals */);
 
   int r = toplev.main (argc, argv);
-#if CHECKING_P
-  toplev.finalize ();
-#endif
+
+  if (flag_checking && !seen_error ())
+    toplev.finalize ();
 
   return r;
 }


             reply	other threads:[~2022-02-28 10:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 10:59 Martin Liska [this message]
2022-02-28 11:04 Martin Liska

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=20220228105910.00A483858435@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@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).