public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tobias Burnus <burnus@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-4718] nvptx: Use fatal_error when -march= is missing not an assert [PR111093]
Date: Wed, 18 Oct 2023 10:24:18 +0000 (GMT)	[thread overview]
Message-ID: <20231018102418.9AD1238560B9@sourceware.org> (raw)

https://gcc.gnu.org/g:d3961765b506f75233e6ea144a80930629c3426b

commit r14-4718-gd3961765b506f75233e6ea144a80930629c3426b
Author: Tobias Burnus <tobias@codesourcery.com>
Date:   Wed Oct 18 12:23:38 2023 +0200

    nvptx: Use fatal_error when -march= is missing not an assert [PR111093]
    
    gcc/ChangeLog:
    
            PR target/111093
            * config/nvptx/nvptx.cc (nvptx_option_override): Issue fatal error
            instead of an assert ICE when no -march= has been specified.

Diff:
---
 gcc/config/nvptx/nvptx.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index edef39fb5e1e..634c31673be9 100644
--- a/gcc/config/nvptx/nvptx.cc
+++ b/gcc/config/nvptx/nvptx.cc
@@ -335,8 +335,9 @@ nvptx_option_override (void)
   init_machine_status = nvptx_init_machine_status;
 
   /* Via nvptx 'OPTION_DEFAULT_SPECS', '-misa' always appears on the command
-     line.  */
-  gcc_checking_assert (OPTION_SET_P (ptx_isa_option));
+     line; but handle the case that the compiler is not run via the driver.  */
+  if (!OPTION_SET_P (ptx_isa_option))
+    fatal_error (UNKNOWN_LOCATION, "%<-march=%> must be specified");
 
   handle_ptx_version_option ();

                 reply	other threads:[~2023-10-18 10:24 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=20231018102418.9AD1238560B9@sourceware.org \
    --to=burnus@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).