[Issue 14267] New: [REG2.067 beta] ICE when determining if a function can be inlined
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Mar 9 20:24:21 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14267
Issue ID: 14267
Summary: [REG2.067 beta] ICE when determining if a function can
be inlined
Product: D
Version: unspecified
Hardware: All
OS: All
Status: NEW
Keywords: ice, ice-on-valid-code
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: opantm2+dbugs at gmail.com
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.
````
--
More information about the Digitalmars-d-bugs
mailing list