This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Do not report non-executed blocks in Ada coverage
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 06 Nov 2017 09:21:27 +0100
- Subject: Re: [patch] Do not report non-executed blocks in Ada coverage
- Authentication-results: sourceware.org; auth=none
- References: <8628973.M8QiBYR5HD@polaris> <05c31541-6d1e-f42c-9b9d-5869c3c4ebd5@suse.cz>
> I would probably incline to emit some information to *.gcno file that will
> reflect that we should not report unexecuted blocks.
I'm a bit reluctant to modify the gcov format, unless your changes did though.
> However, as I've been reading dump file:
>
> P.Add (const integer i1, const integer i2)
> {
> complex int D.4219;
> integer iftmp.2;
> integer D.4217;
> integer _1;
> complex int _4;
> integer iftmp.2_5;
> integer _6;
>
> <bb 2> [0.00%]:
> _4 = ADD_OVERFLOW (i1_2(D), i2_3(D));
> _1 = IMAGPART_EXPR <_4>;
> if (_1 != 0)
> goto <bb 3>; [0.00%]
> else
> goto <bb 4>; [0.00%]
>
> <bb 3> [0.00%]:
> .gnat_rcheck_CE_Overflow_Check ("p.adb", 5);
>
> <bb 4> [0.00%]:
> iftmp.2_5 = REALPART_EXPR <_4>;
> _6 = iftmp.2_5;
>
> <L3> [0.00%]:
> return _6;
>
> }
>
> Isn't the <bb 3> some kind of exceptional basic block?
No, it's just the regular target of the goto just above.
> Can one find such blocks in middle-end? In case of C++, exceptional blocks
> are not considered for the warning.
Likewise, but it's a different issue here.
--
Eric Botcazou