From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 4D8073858D28 for ; Thu, 16 Dec 2021 14:37:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4D8073858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 37A25212B6 for ; Thu, 16 Dec 2021 14:37:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1639665427; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlKDJVAIHQyWgXf/CYdU9+ejhela5ySIDVAbbcpMOFE=; b=y6TOEtruTTuOmgNTfn6cvR5N5Pbm+WDE26NLajcuiEazAwDNKmK3hda76RKoeZ8TjAwJcd ao0lfEDBnqUb82TSa/ClUGDo2yaczLc+vCraUkpEgAYHTqi7sB8AbM8cpkekKY6X+VUFcO GY6Koocxk6jcXTRfx4JKTqbcrQh/m8I= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1639665427; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YlKDJVAIHQyWgXf/CYdU9+ejhela5ySIDVAbbcpMOFE=; b=6q6Ap/meiDoNv7SbhxjNvqtrO72S+cNtl4RQ2CFHPaMXeqjLVJdZVpgj8Lc39GarZIdq9Z R14oY8UZ3+deCsDA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2904B13E3B for ; Thu, 16 Dec 2021 14:37:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id D2S2CBNPu2EGFAAAMHmgww (envelope-from ) for ; Thu, 16 Dec 2021 14:37:07 +0000 Message-ID: <965326f3-3658-f7d0-c5d8-a89a0d16d740@suse.cz> Date: Thu, 16 Dec 2021 15:37:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Subject: [PATCH] opts: do not do sanity check when an error is seen To: gcc-patches@gcc.gnu.org Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Dec 2021 14:37:09 -0000 Do not check global options modification when an error is seen in parsing of options (pragmas or attributes). Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin 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). --- 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); -- 2.34.1