Compiled with -inline: import std.parallelism: taskPool; void main() { int x = taskPool.reduce!q{a + b}([1, 2]); } DMD 2.058 head: Assertion failure: '!vthis->csym' on line 678 in file 'glue.c' The same code compiles and runs without errors without -inline.
Is this a regression? Did it ever work?
import std.parallelism; void func() { } void main() { taskPool.put(task(&func)); } ----------------- I can compile this code in dmd2.057, but cannot compile it in git head. (dmd displays similar error message.)
This reduces to: struct AbstractTask { ubyte taskStatus; } struct Task { AbstractTask base; alias base this; void opAssign(Task rhs){ } ~this() { if (taskStatus != 3) { } } }
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/05e6f16efe9916d58d21b4d7b8433ea639208b82 Issue 7261 - ICE(glue.c): With taskPool.reduce