Bug 10244 – ICE: expression.c:8364: virtual Expression* CallExp::semantic(Scope*): Assertion `td' failed

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-02T10:59:00Z
Last change time
2013-06-28T00:14:40Z
Keywords
ice, pull
Assigned to
nobody
Creator
yazan.dabain

Comments

Comment #0 by yazan.dabain — 2013-06-02T10:59:21Z
Test case shouldn't compile however the compiler errors. Minimized using dustmite: struct Foo { string _str; long _integer; template DeclareConstructor(string propertyName) { enum code = `this(typeof(_` ~ propertyName ~ `) value) { ` ~ propertyName ~ ` = value; }`; mixin(code); } mixin DeclareConstructor!"str"; mixin DeclareConstructor!"integer"; } void main() { auto value = Foo; value.object = Foo("D"); } Replacing enum from code variable with auto stops the ICE.
Comment #1 by yazan.dabain — 2013-06-23T13:30:31Z
Edit: changed assertion line to 8364 based on git HEAD commit 58d3869.
Comment #2 by code — 2013-06-26T22:09:53Z
*** Issue 10450 has been marked as a duplicate of this issue. ***
Comment #3 by bearophile_hugs — 2013-06-27T04:28:19Z
(In reply to comment #2) > *** Issue 10450 has been marked as a duplicate of this issue. *** This issue gives: Assertion failure: 'td' on line 8375 in file 'expression.c' Issue 10450 gives: Internal error: backend\cgcv.c 2162 It's totally different code, a different source file, so I think you are wrong.
Comment #4 by code — 2013-06-27T09:24:09Z
Damnit, typo: I meant issue 10224 http://d.puremagic.com/issues/show_bug.cgi?id=10224
Comment #5 by k.hara.pg — 2013-06-27T22:33:17Z
Comment #6 by github-bugzilla — 2013-06-27T22:55:35Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/2f2f39c45825f2c13cfc9a249531823fb9e64539 fix Issue 10244 - ICE: expression.c:8364: virtual Expression* CallExp::semantic(Scope*): Assertion `td' failed https://github.com/D-Programming-Language/dmd/commit/2abca6803db3e05d2a35c36abc61c18ad328c7e4 Merge pull request #2265 from 9rnsr/fix10244 Issue 10244 - ICE: expression.c:8364: virtual Expression* CallExp::semantic(Scope*): Assertion `td' failed
Comment #7 by yazan.dabain — 2013-06-28T00:14:40Z
Thanks Kenji!