From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 270CB3858001; Wed, 12 Jan 2022 11:53:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 270CB3858001 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-6519] 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: 4ec756cee0be1510a9fcb3dcb9bdea625f774277 X-Git-Newrev: 4960516df2f90e6ae16aa03c63c8bf2c702e6bc4 Message-Id: <20220112115301.270CB3858001@sourceware.org> Date: Wed, 12 Jan 2022 11:53:01 +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: Wed, 12 Jan 2022 11:53:01 -0000 https://gcc.gnu.org/g:4960516df2f90e6ae16aa03c63c8bf2c702e6bc4 commit r12-6519-g4960516df2f90e6ae16aa03c63c8bf2c702e6bc4 Author: Martin Liska Date: Wed Jan 12 12:48:33 2022 +0100 opts: do not do sanity check when an error is seen PR target/103804 gcc/c-family/ChangeLog: * c-attribs.c (handle_optimize_attribute): Do not call cl_optimization_compare if we seen an error. Diff: --- gcc/c-family/c-attribs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index dbb892e0ec6..bdf72ce385c 100644 --- a/gcc/c-family/c-attribs.c +++ b/gcc/c-family/c-attribs.c @@ -5516,7 +5516,8 @@ handle_optimize_attribute (tree *node, tree name, tree args, if (saved_global_options != NULL) { - cl_optimization_compare (saved_global_options, &global_options); + if (!seen_error ()) + cl_optimization_compare (saved_global_options, &global_options); free (saved_global_options); } }