aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2021-12-16 13:33:00 +0100
committerMartin Liska <mliska@suse.cz>2021-12-16 17:49:59 +0100
commit54e6d3ef5021d7df936132ba961f9c360239e717 (patch)
tree0ba86c8e94fbcddc3049acde5746c589e2f5f924
parent5b8f5a50a93c5fd44fa1ecb6f431fee1df267571 (diff)
downloadgcc-54e6d3ef5021d7df936132ba961f9c360239e717.zip
gcc-54e6d3ef5021d7df936132ba961f9c360239e717.tar.gz
gcc-54e6d3ef5021d7df936132ba961f9c360239e717.tar.bz2
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).
-rw-r--r--gcc/c-family/c-pragma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index c4ed420..0772c34 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);