Bug 14267 – [REG2.067beta2] ICE when determining if a function can be inlined
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-10T03:24:00Z
Last change time
2015-06-17T21:01:49Z
Keywords
ice, pull
Assigned to
nobody
Creator
opantm2+dbugs
Comments
Comment #0 by opantm2+dbugs — 2015-03-10T03:24:21Z
Requires -inline to be passed in as the ICE occurs when detecting if inlining is possible. I'm not sure why that __traits(getProtection, func) is required, but it seems to be. I used '-O -inline -release' to trigger the ICE.
Code:
````
import std.datetime;
void main() {
foreach(m; __traits(allMembers, SysTime)) {
static if(is(typeof(__traits(getMember, SysTime, m)))) {
foreach(func; __traits(getOverloads, SysTime, m)) {
auto prot = __traits(getProtection, func);
static if(__traits(isStaticFunction, func))
auto result = func;
}
}
}
}
````
Output:
````
rdmd -O -inline -release temp.d
Assertion failed: (fd->semanticRun >= PASSsemantic3done), function canInline, file inline.c, line 1646.
````