This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Do not report non-executed blocks in Ada coverage


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]