aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2023-10-18 12:23:38 +0200
committerTobias Burnus <tobias@codesourcery.com>2023-10-18 12:23:38 +0200
commitd3961765b506f75233e6ea144a80930629c3426b (patch)
tree0c10370ac87505c4d60ff86aebf3509d0c70400b
parenta4184c8a65a00eaf8a8d7f92fb8ad2f8621b39e2 (diff)
downloadgcc-d3961765b506f75233e6ea144a80930629c3426b.zip
gcc-d3961765b506f75233e6ea144a80930629c3426b.tar.gz
gcc-d3961765b506f75233e6ea144a80930629c3426b.tar.bz2
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.
-rw-r--r--gcc/config/nvptx/nvptx.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc
index edef39f..634c316 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 ();