From: Tobias Burnus Date: Wed, 18 Oct 2023 10:23:38 +0000 (+0200) Subject: nvptx: Use fatal_error when -march= is missing not an assert [PR111093] X-Git-Tag: basepoints/gcc-15~5421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3961765b506f75233e6ea144a80930629c3426b;p=thirdparty%2Fgcc.git 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 --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 ();