D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19693 - core.bitop.bitswap fails to compile with -inline
Summary: core.bitop.bitswap fails to compile with -inline
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-22 13:24 UTC by Rainer Schuetze
Modified: 2020-11-09 15:05 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Rainer Schuetze 2019-02-22 13:24:24 UTC
Compile with "dmd -inline":

import core.bitop;
void main()
{
    ulong y = 0x12345678;
    ulong x = bitswap(y);
}

/dlang/dmd/linux/bin64/../../src/druntime/import/core/bitop.d(817): Error: function `core.bitop.bitswap` cannot inline function

Could also be considered a druntime issue as it uses pragma(inline,true).
Comment 1 Nathan S. 2020-11-09 15:05:23 UTC
Something fixed this between 2.091.1 and 2.092.1.