Bug 15239 – ICE (assertion failure) in ctfeInterpret() — opDispatch & inline asm

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-23T05:55:00Z
Last change time
2016-02-01T13:23:39Z
Keywords
iasm, ice, pull
Assigned to
nobody
Creator
cauterite
Depends on
15309

Comments

Comment #0 by cauterite — 2015-10-23T05:55:19Z
http://dpaste.dzfl.pl/b8c580346198 Tested in DMD v2.068.2 (in case dpaste is offline:) Code: struct T { template opDispatch(string Name, P...) { static void opDispatch(P) {}; }; }; void main() { asm { call T.foo; }; }; Output: dmd: interpret.c:731: Expression* ctfeInterpret(Expression*): Assertion `e->type' failed.
Comment #1 by dlang-bugzilla — 2015-10-27T10:58:52Z
2.064 .. 2.065: test.d(9): Error: Cannot interpret opDispatch!"foo" at compile time test.d(9): Error: bad type/size of operands '__error' 2.066 .. 2.067: segfault 2.068: Assertion failure: 'e->type' on line 731 in file 'interpret.c' 2.069: segfault Curiously, the Win32 "Access violation" stack trace I get with 2.069 changes every time I run the compiler. Probably due to lack of stack frames.
Comment #2 by k.hara.pg — 2015-11-10T01:44:58Z
Comment #3 by github-bugzilla — 2015-11-10T12:29:24Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f66d3b5708b6221497817051c2f5f4c413ff96ae fix Issue 15239 - ICE (assertion failure) in ctfeInterpret() - opDispatch & inline asm https://github.com/D-Programming-Language/dmd/commit/b72609a186dc4c3447cc60d94265c7b4e2a71768 Merge pull request #5263 from 9rnsr/fix15239 Issue 15239 - ICE (assertion failure) in ctfeInterpret() - opDispatch & inline asm
Comment #4 by github-bugzilla — 2016-01-03T14:02:24Z
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f66d3b5708b6221497817051c2f5f4c413ff96ae fix Issue 15239 - ICE (assertion failure) in ctfeInterpret() - opDispatch & inline asm https://github.com/D-Programming-Language/dmd/commit/b72609a186dc4c3447cc60d94265c7b4e2a71768 Merge pull request #5263 from 9rnsr/fix15239
Comment #5 by github-bugzilla — 2016-01-27T12:36:44Z
Comment #6 by github-bugzilla — 2016-01-31T14:58:56Z
Comment #7 by github-bugzilla — 2016-02-01T13:23:39Z
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/414f69d116e62cc6b5a8facef2fecf10b4c65c0b Revert "workaround Issue 15239" This reverts commit 5fbc1b8f53712116893ea5c6c7080125fa1308fa.