D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7261 - ICE(glue.c): With taskPool.reduce
Summary: ICE(glue.c): With taskPool.reduce
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 regression
Assignee: No Owner
URL:
Keywords: ice
Depends on:
Blocks:
 
Reported: 2012-01-09 16:51 UTC by bearophile_hugs
Modified: 2012-02-05 22:17 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2012-01-09 16:51:12 UTC
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 Walter Bright 2012-02-04 01:43:30 UTC
Is this a regression? Did it ever work?
Comment 2 SHOO 2012-02-04 23:47:11 UTC
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 Walter Bright 2012-02-05 20:11:12 UTC
This reduces to:

struct AbstractTask {
    ubyte taskStatus;
}

struct Task {
    AbstractTask base;
    alias base this;

    void opAssign(Task rhs){ }

    ~this()
    {
        if (taskStatus != 3) { }
    }
}
Comment 4 github-bugzilla 2012-02-05 22:17:01 UTC
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