]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
nvptx: Use fatal_error when -march= is missing not an assert [PR111093]
authorTobias Burnus <tobias@codesourcery.com>
Wed, 18 Oct 2023 10:23:38 +0000 (12:23 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Wed, 18 Oct 2023 10:23:38 +0000 (12:23 +0200)
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.

gcc/config/nvptx/nvptx.cc

index edef39fb5e1ee699874faccd805005621a6e3508..634c31673be92e8787d6b59361ceb5fe0e2669c3 100644 (file)
@@ -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 ();