From: Martin Liska Date: Thu, 16 Dec 2021 12:33:00 +0000 (+0100) Subject: opts: do not do sanity check when an error is seen X-Git-Tag: basepoints/gcc-13~2294 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54e6d3ef5021d7df936132ba961f9c360239e717;p=thirdparty%2Fgcc.git opts: do not do sanity check when an error is seen PR target/103709 gcc/c-family/ChangeLog: * c-pragma.c (handle_pragma_pop_options): Do not check global options modification when an error is seen in parsing of options (pragmas or attributes). --- diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index c4ed42058203..0772c34342a7 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -1132,7 +1132,7 @@ handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy)) p->optimize_binary); optimization_current_node = p->optimize_binary; } - if (flag_checking) + if (flag_checking && !seen_error ()) { cl_optimization_compare (p->saved_global_options, &global_options); free (p->saved_global_options);