From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 70E36385842A; Thu, 16 Dec 2021 16:52:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 70E36385842A MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6019] opts: do not do sanity check when an error is seen X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/heads/master X-Git-Oldrev: 5b8f5a50a93c5fd44fa1ecb6f431fee1df267571 X-Git-Newrev: 54e6d3ef5021d7df936132ba961f9c360239e717 Message-Id: <20211216165209.70E36385842A@sourceware.org> Date: Thu, 16 Dec 2021 16:52:09 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2021 16:52:09 -0000 https://gcc.gnu.org/g:54e6d3ef5021d7df936132ba961f9c360239e717 commit r12-6019-g54e6d3ef5021d7df936132ba961f9c360239e717 Author: Martin Liska Date: Thu Dec 16 13:33:00 2021 +0100 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: --- gcc/c-family/c-pragma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index c4ed4205820..0772c34342a 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);