[PATCH] PR86957
Martin Liška
mliska@suse.cz
Tue Sep 11 09:23:00 GMT 2018
On 09/05/2018 09:28 PM, Indu Bhagat wrote:
> Patch for PR 86957 " gcc should warn about missing profiles for a compilation unit or a new function with -fprofile-use".
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86957
>
> The patch adds -Wmissing-profile warning flag to alert user about cases when there is no profile data for a compilation unit or a function when using -fprofile-use.
>
> The flag is on by default when -fprofile-use is specified and generates errors
> by default (like -Wcoverage-mismatch).
>
> The attachment pr86957-missing-profile-diagnostic shows the behavior of GCC with the patch.
>
> Thanks
> Indu
>
> ------------------------------------------------------
>
>
> gcc/ChangeLog:
>
> 2018-09-05Â "Indu Bhagat"Â <"indu.bhagat@oracle.com">
>
> Â Â Â Â Â Â Â * common.opt: New warning option -Wmissing-profile.
> Â Â Â Â Â Â Â * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
> Â Â Â Â Â Â Â * doc/invoke.texi: Document -Wmissing-profile.
> Â Â Â Â Â Â Â * profile.c (get_exec_counts): Add warning for missing feedback
> Â Â Â Â Â Â Â Â Â profile for a function.
> Â Â Â Â Â Â Â * toplev.c (process_options): -Wmissing-profile warning as error.
>
... and please add a test-case for the missing file. That's easy to achieve by running
a test-case with -fprofile-use.
Martin
More information about the Gcc-patches
mailing list