public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andrea Corallo <akrl@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3201] Don't ICE running selftests if errors were raised [PR99723]
Date: Mon, 10 Oct 2022 13:22:59 +0000 (GMT)	[thread overview]
Message-ID: <20221010132259.CEF433858284@sourceware.org> (raw)

https://gcc.gnu.org/g:248c8aeebc49aae3fd96bd587367d12e7c8b3c3a

commit r13-3201-g248c8aeebc49aae3fd96bd587367d12e7c8b3c3a
Author: Andrea Corallo <andrea.corallo@arm.com>
Date:   Tue Sep 27 16:20:28 2022 +0200

    Don't ICE running selftests if errors were raised [PR99723]
    
    Hi all
    
    this is to address PR 99723.
    
    In the PR GCC crashes as the initialization of common trees is not
    performed as no compilation is happening, this is because we raise an
    error earlier while processing the arch flags.
    
    This patch changes the code to execute selftests only if no errors
    where raised before.
    
    Bootstrapped on aarch64, okay for trunk?
    
    Best Regards
    
      Andrea
    
    2022-09-27  Andrea Corallo  <andrea.corallo@arm.com>
    
            PR other/99723
            * toplev.cc (toplev::main): Don't run self tests in case of
            previous error.

Diff:
---
 gcc/toplev.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/toplev.cc b/gcc/toplev.cc
index 924871fa9a8..b53a78bbaf1 100644
--- a/gcc/toplev.cc
+++ b/gcc/toplev.cc
@@ -2276,7 +2276,7 @@ toplev::main (int argc, char **argv)
 	start_timevars ();
       do_compile (no_backend);
 
-      if (flag_self_test)
+      if (flag_self_test && !seen_error ())
 	{
 	  if (no_backend)
 	    error_at (UNKNOWN_LOCATION, "self-tests incompatible with %<-E%>");

                 reply	other threads:[~2022-10-10 13:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221010132259.CEF433858284@sourceware.org \
    --to=akrl@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).