Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
August 02, 2020 Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
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? |
August 02, 2020 Re: Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | 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);
.
|
August 02, 2020 Re: Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | 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.
|
August 02, 2020 Re: Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | 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 |
August 02, 2020 Re: Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stefan Koch | 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?
|
August 02, 2020 Re: Wrong stats of `pragma(inline, true)`-functions when compiling with `-cov` flag | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | 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? |
Copyright © 1999-2021 by the D Language Foundation