From: Martin Liska Date: Wed, 12 Jan 2022 11:48:33 +0000 (+0100) Subject: opts: do not do sanity check when an error is seen X-Git-Tag: basepoints/gcc-13~1794 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4960516df2f90e6ae16aa03c63c8bf2c702e6bc4;p=thirdparty%2Fgcc.git 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 --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c index dbb892e0ec6d..bdf72ce385c4 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); } }