Thread overview
Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag
5 days ago
Per Nordlöw
5 days ago
Per Nordlöw
5 days ago
Stefan Koch
5 days ago
Per Nordlöw
5 days ago
Per Nordlöw
5 days ago
Per Nordlöw
5 days ago
I've noticed that the results of

    dmd -cov

are incorrect for inline-functions such as

void f()
{
    pragma(inline, true);
    ...
}

eventhough I feed `dmd` neither the `-O` nor `-inline` nor `-release` flag.

The problem goes away when I remove the `pragma(inline, true)`-directives from the affected function.

Is this a know issue?
5 days ago
On Sunday, 2 August 2020 at 11:15:53 UTC, Per Nordlöw wrote:
> The problem goes away when I remove the `pragma(inline, true)`-directives from the affected function.

In the meanwhile I can elide this issue via

    version(D_Coverage) {} else pragma(inline, true);

in-place of

    pragma(inline, true);

.
5 days ago
On Sunday, 2 August 2020 at 11:15:53 UTC, Per Nordlöw wrote:
> I've noticed that the results of
>
>     dmd -cov
>
> are incorrect for inline-functions such as
>
> void f()
> {
>     pragma(inline, true);
>     ...
> }
>
> eventhough I feed `dmd` neither the `-O` nor `-inline` nor `-release` flag.
>
> The problem goes away when I remove the `pragma(inline, true)`-directives from the affected function.
>
> Is this a know issue?

Well the inliner is now active even without the inline flag.

If you use an older compiler the issue goes away.

5 days ago
On Sunday, 2 August 2020 at 12:06:48 UTC, Stefan Koch wrote:
> Well the inliner is now active even without the inline flag.
>
> If you use an older compiler the issue goes away.

Ok, thanks.

For reference see

https://forum.dlang.org/thread/lhmfyondzdniusvhjxzp@forum.dlang.org
5 days ago
On Sunday, 2 August 2020 at 12:06:48 UTC, Stefan Koch wrote:
> Well the inliner is now active even without the inline flag.
>
> If you use an older compiler the issue goes away.

AFAICT, inlining triggered by

    pragma(inline, true);

should be disabled when the `-cov` flag is given.

Right?
5 days ago
On Sunday, 2 August 2020 at 12:50:33 UTC, Per Nordlöw wrote:
> AFAICT, inlining triggered by
>
>     pragma(inline, true);
>
> should be disabled when the `-cov` flag is given.
>
> Right?

Can you take a look at

https://github.com/dlang/dmd/pull/11490

Stefan Koch?