[PATCH] Introduce -Wcoverage-invalid-line-number
Jeff Law
jeffreyalaw@gmail.com
Wed Jun 9 16:14:47 GMT 2021
On 6/1/2021 8:09 AM, Martin Liška wrote:
> Hello.
>
> As seen in the PR, one can easily corrupt line number information and
> we can end up with a function that ends before it starts ;)
> I'm adding a new warning for that instead of the ICE.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> PR gcov-profile/100788
>
> gcc/ChangeLog:
>
> * common.opt: Add new option.
> * coverage.c (coverage_begin_function): Emit warning instead on
> the internal compiler error.
> * doc/invoke.texi: Document the option.
> * toplev.c (process_options): Enable it by default.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/pr100788.c: New test.
OK
jeff
More information about the Gcc-patches
mailing list