Commit 37731134 by Martin Liska Committed by Martin Liska

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
parent 8fd23c8e
2017-01-30 Martin Liska <mliska@suse.cz> 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 bootstrap/78985 PR bootstrap/78985
* config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze): * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
Initialize variables with NULL value. Initialize variables with NULL value.
......
...@@ -2150,6 +2150,8 @@ common_handle_option (struct gcc_options *opts, ...@@ -2150,6 +2150,8 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_profile_values = value; opts->x_flag_profile_values = value;
if (!opts_set->x_flag_inline_functions) if (!opts_set->x_flag_inline_functions)
opts->x_flag_inline_functions = value; 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 /* FIXME: Instrumentation we insert makes ipa-reference bitmaps
quadratic. Disable the pass until better memory representation quadratic. Disable the pass until better memory representation
is done. */ is done. */
......
2017-01-30 Martin Liska <mliska@suse.cz>
PR gcov-profile/79259
* g++.dg/tree-prof/pr79259.C: New test.
2017-01-30 Richard Biener <rguenther@suse.de> 2017-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/79276 PR tree-optimization/79276
......
/* { dg-options "-O1" } */
inline bool
a (int b)
{
return (b & 5) != b;
}
int c;
int
fn2 ()
{
if (a (c == 0))
return 0;
}
int main()
{
fn2();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment