www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [-profiler && std.parallelism] Error: asm statements are assumed

reply Andrew Edwards <ridimz yahoo.com> writes:
Just verifying this is a bug:

import std.parallelism;

void main(string[] args)
{
	foreach(arg; (args[1..$]).parallel) {

	}
}

seireitei:~ ace$ dmd -profile bug
/usr/share/dmd/src/druntime/import/core/atomic.d(972): Error: asm 
statements are assumed to throw
/usr/share/dmd/src/druntime/import/core/atomic.d(973): Error: asm 
statements are assumed to throw
/usr/share/dmd/src/druntime/import/core/atomic.d(974): Error: asm 
statements are assumed to throw
/usr/share/dmd/src/druntime/import/core/atomic.d(975): Error: asm 
statements are assumed to throw
Mar 27 2014
next sibling parent "Vladimir Panteleev" <vladimir thecybershadow.net> writes:
On Friday, 28 March 2014 at 00:08:57 UTC, Andrew Edwards wrote:
 Just verifying this is a bug:

Yep, it's a bug. https://d.puremagic.com/issues/show_bug.cgi?id=10849
Mar 27 2014
prev sibling parent "Paolo Invernizzi" <paolo.invernizzi no.address> writes:
On Friday, 28 March 2014 at 00:08:57 UTC, Andrew Edwards wrote:
 Just verifying this is a bug:

 import std.parallelism;

 void main(string[] args)
 {
 	foreach(arg; (args[1..$]).parallel) {

 	}
 }

 seireitei:~ ace$ dmd -profile bug
 /usr/share/dmd/src/druntime/import/core/atomic.d(972): Error: 
 asm statements are assumed to throw
 /usr/share/dmd/src/druntime/import/core/atomic.d(973): Error: 
 asm statements are assumed to throw
 /usr/share/dmd/src/druntime/import/core/atomic.d(974): Error: 
 asm statements are assumed to throw
 /usr/share/dmd/src/druntime/import/core/atomic.d(975): Error: 
 asm statements are assumed to throw

An unrelated question: so -profile _can_ be used in a multithreaded program, if I stick to output regarding function not involved with threads? Thanks, Paolo
Mar 27 2014