Bug 15296 – [REG2.069] cannot inline simple function that calls use non-inlinable statements
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-11-06T11:19:00Z
Last change time
2016-02-29T19:57:04Z
Keywords
pull
Assigned to
nobody
Creator
r.sagitario
Comments
Comment #0 by r.sagitario — 2015-11-06T11:19:24Z
The inliner is getting worse:
struct GCBits
{
void setWords(size_t , size_t )
{
for(size_t w = 0; false; ) {}
}
pragma(inline,true)
void setRange(size_t target, size_t len)
{
setWords(target, len);
}
}
void foo()
{
GCBits bits;
bits.setRange(0, 0);
}
This used to compile with "-inline" with dmd 2.068, but does no longer with dmd 2.069 and git HEAD.
Comment #1 by dlang-bugzilla — 2015-11-09T19:26:12Z