public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6519] opts: do not do sanity check when an error is seen
@ 2022-01-12 11:53 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-01-12 11:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4960516df2f90e6ae16aa03c63c8bf2c702e6bc4

commit r12-6519-g4960516df2f90e6ae16aa03c63c8bf2c702e6bc4
Author: Martin Liska <mliska@suse.cz>
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);
 	}
     }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-12 11:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 11:53 [gcc r12-6519] opts: do not do sanity check when an error is seen Martin Liska

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).