← Back to index
|
Original Bugzilla link
Bug 22148 – noreturn ICE on templates
Status
RESOLVED
Resolution
WORKSFORME
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-07-27T09:55:47Z
Last change time
2021-10-12T19:39:28Z
Keywords
backend
Assigned to
No Owner
Creator
Temtaime
Comments
Comment #0
by temtaime — 2021-07-27T09:55:47Z
import std; bool throwError(string S, string File = __FILE__, uint Line = __LINE__, A...)(A args) { return throwError(args.format!S, File, Line); } noreturn throwError(T)(T value, string file = __FILE__, uint line = __LINE__) { throw new Exception(value.to!string, file, line); } void main() { try { throwError!`%s`(10); } catch(Exception) {} } Result: Illegal instruction (core dumped) Expected: pass OK
Comment #1
by hsteoh — 2021-08-08T22:42:44Z
Reproduced problem on latest git 9fb279b9ce80240cc54f82825138ffcee4ff8303 Output: -------- dmd: src/dmd/backend/cod1.d:4052: Assertion `retregs || !*pretregs' failed. Aborted -------- Looks like bug in backend.
Comment #2
by kinke — 2021-08-09T12:28:38Z
(In reply to hsteoh from comment #1) > Looks like bug in backend. Yep, works with LDC.
Comment #3
by moonlightsentinel — 2021-10-12T19:39:28Z
Tested with current master (2bd3d7d5eb682cf238cffbee2e1ac1bad8cd2225). Probably fixed as a side effect of
https://github.com/dlang/dmd/pull/13135.