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. ````
Comment #1 by k.hara.pg — 2015-03-10T05:33:30Z
Comment #2 by github-bugzilla — 2015-03-10T16:41:24Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e5e7ddca3fd90a8fc473a594efd9204fc6818f73 fix Issue 14267 - ICE when determining if a function can be inlined https://github.com/D-Programming-Language/dmd/commit/ee24a3e7e7123925fa6d6f7569115ed2e1435718 Merge pull request #4471 from 9rnsr/fix14267 [REG2.067beta2] Issue 14267 - ICE when determining if a function can be inlined
Comment #3 by github-bugzilla — 2015-03-11T10:02:53Z
Commit pushed to 2.067 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/c29d893a456a9dfee532c2b0a5f6615b3dbc080f Merge pull request #4471 from 9rnsr/fix14267 [REG2.067beta2] Issue 14267 - ICE when determining if a function can be inlined
Comment #4 by github-bugzilla — 2015-04-11T12:24:55Z
Comment #5 by github-bugzilla — 2015-06-17T21:01:49Z