[Issue 10849] New: -profile flag results in compiler errors with std.parallelism

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 18 21:16:19 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10849

           Summary: -profile flag results in compiler errors with
                    std.parallelism
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: tcdknutson at gmail.com


--- Comment #0 from Dylan <tcdknutson at gmail.com> 2013-08-18 21:16:18 PDT ---
Compiling a program with DMD with the compiler switch -profile will result in
the compiler error "Error: asm statements are assumed to throw" if
std.parallelism components are used; namely taskPool.parallel(). 

Tested with DMD version 2.063 and the Phobos that ships with it. 

For example: 

cat test.d
```
import std.stdio;
import std.range : iota;
import std.parallelism : taskPool;

void main() {
    int sum = 0;
    foreach(i; taskPool.parallel(iota(10)))
    {
        sum += i;
    }
}
```

dmd -profile test.d
```
src\druntime\import\core\atomic.d(500): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(501): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(502): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(503): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(392): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(393): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(394): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(395): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(396): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(455): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(456): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(279): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(280): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(281): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(282): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(283): Error: asm statements are assumed to
throw
src\druntime\import\core\atomic.d(284): Error: asm statements are assumed to
throw
```

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list