Bug 7261 – ICE(glue.c): With taskPool.reduce

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-01-09T16:51:00Z
Last change time
2012-02-05T22:17:17Z
Keywords
ice
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-01-09T16:51:12Z
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.
Comment #1 by bugzilla — 2012-02-04T01:43:30Z
Is this a regression? Did it ever work?
Comment #2 by zan77137 — 2012-02-04T23:47:11Z
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.)
Comment #3 by bugzilla — 2012-02-05T20:11:12Z
This reduces to: struct AbstractTask { ubyte taskStatus; } struct Task { AbstractTask base; alias base this; void opAssign(Task rhs){ } ~this() { if (taskStatus != 3) { } } }
Comment #4 by github-bugzilla — 2012-02-05T22:17:01Z