diff options
author | Martin Liska <mliska@suse.cz> | 2021-06-01 10:41:04 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2021-06-01 15:23:58 +0200 |
commit | b195d84561a5c31108c7bbbd7c5b63fe3cebe35f (patch) | |
tree | e78b61b941106ea3846215f2102c5946e2800399 /gcc/c-family/c-pragma.c | |
parent | 9f7bc160b4a0f27dce248d1226e3ae7104b0e67b (diff) | |
download | gcc-b195d84561a5c31108c7bbbd7c5b63fe3cebe35f.zip gcc-b195d84561a5c31108c7bbbd7c5b63fe3cebe35f.tar.gz gcc-b195d84561a5c31108c7bbbd7c5b63fe3cebe35f.tar.bz2 |
Fix sanity checking of global_options.
gcc/c-family/ChangeLog:
PR other/100759
* c-attribs.c (handle_optimize_attribute): Limit sanity check
to a situation where we are not in processing of an optimize
pragma.
* c-pragma.c (handle_pragma_pop_options): Restore target
options.
Diffstat (limited to 'gcc/c-family/c-pragma.c')
-rw-r--r-- | gcc/c-family/c-pragma.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c index 7f658ea..f46b5b9 100644 --- a/gcc/c-family/c-pragma.c +++ b/gcc/c-family/c-pragma.c @@ -1088,6 +1088,8 @@ handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy)) * overwritten by invoke_set_current_function_hook. */ cl_optimization_restore (&global_options, &global_options_set, TREE_OPTIMIZATION (p->optimize_binary)); + cl_target_option_restore (&global_options, &global_options_set, + TREE_TARGET_OPTION (p->target_binary)); if (p->optimize_binary != optimization_current_node) { |