aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-01-30 16:35:57 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-01-30 15:35:57 +0000
commit37731134c71cc81ed8245d583e1fbbfab879fa5f (patch)
tree3d626a4862a93b559113fcd051f64f20bfe8f2de /gcc/opts.c
parent8fd23c8e9ff446200401354d810a9c144ee72e65 (diff)
downloadgcc-37731134c71cc81ed8245d583e1fbbfab879fa5f.zip
gcc-37731134c71cc81ed8245d583e1fbbfab879fa5f.tar.gz
gcc-37731134c71cc81ed8245d583e1fbbfab879fa5f.tar.bz2
Fix profile corruption with -O1 (PR gcov-profile/79259)
2017-01-30 Martin Liska <mliska@suse.cz> PR gcov-profile/79259 * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/ -fprofile-generate. 2017-01-30 Martin Liska <mliska@suse.cz> PR gcov-profile/79259 * g++.dg/tree-prof/pr79259.C: New test. From-SVN: r245031
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index 5f573a1..b38e9b4 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2150,6 +2150,8 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_profile_values = value;
if (!opts_set->x_flag_inline_functions)
opts->x_flag_inline_functions = value;
+ if (!opts_set->x_flag_ipa_bit_cp)
+ opts->x_flag_ipa_bit_cp = value;
/* FIXME: Instrumentation we insert makes ipa-reference bitmaps
quadratic. Disable the pass until better memory representation
is done. */