Bug 16233 – [REG2.069] ICE on wrong code

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-07-03T22:11:00Z
Last change time
2016-10-01T11:48:16Z
Keywords
ice-on-valid-code, pull
Assigned to
nobody
Creator
andrei

Comments

Comment #0 by andrei — 2016-07-03T22:11:32Z
This code (reduced from a larger codebase) causes dmd to abort with "null this": enum valueConvertible(T1, T2) = blah; struct Checked(T, Hook) { bool opEquals(U)(Checked!(U, Hook) rhs) { alias R = typeof(payload + rhs.payload); static if (valueConvertible!(T, R)) { } return false; } } unittest { Checked!(Checked!(int, void), void) x1; }
Comment #1 by ag0aep6g — 2016-07-03T22:32:22Z
Reduced a little bit more: ---- enum valueConvertible(T2) = blah; struct Checked(T) { void opEquals(U)(Checked!U rhs) { alias R = typeof(payload); enum e = valueConvertible!R; } } alias C = Checked!int; ---- No ICE with 2.068. Segfaults with 2.069 which is probably just the -release variant of the "null this" AssertError.
Comment #2 by bugzilla — 2016-07-03T22:40:03Z
Comment #3 by github-bugzilla — 2016-07-04T00:36:34Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/5cd44d97235b2ac36e33137f093883d8e64dee5b fix Issue 16233 - ICE on wrong code https://github.com/dlang/dmd/commit/720bf42a1e4b2583d194cd0d9794dd5ea9bfb778 Merge pull request #5906 from WalterBright/fix16233 fix Issue 16233 - ICE on wrong code
Comment #4 by github-bugzilla — 2016-10-01T11:48:16Z