Bug in cilkpp commandline compiler

Bug in cilkpp commandline compiler

n.sherlock's picture
Hi there,

The cilkpp commandline compiler doesn't handle wildcards correctly when parsing source files. This command works with cl:

cl md5main.c md5.c

And works in cilkpp:

cilkpp md5main.c md5.c

Which results in these calls to cl:

CL Compiler
"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin\\cl.exe" /c /Fo"C:\\workspace\\Concurrent\\test\\cilk\\md5main.obj" /I "C:\\Program Files (x86)\\Intel\\Cilk\\include" "md5main.c"

CL Compiler
"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin\\cl.exe" /c /Fo"C:\\workspace\\Concurrent\\test\\cilk\\md5.obj" /I "C:\\Program Files (x86)\\Intel\\Cilk\\include" "md5.c"

LINK
"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin\\link.exe" /out:"C:\\workspace\\Concurrent\\test\\cilk\\md5main.exe" /libpath:"C:\\Program Files (x86)\\Intel\\Cilk\\lib" /libpath:"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\lib" "C:\\workspace\\Concurrent\\test\\cilk\\md5main.obj" "C:\\workspace\\Concurrent\\test\\cilk\\md5.obj" /INCREMENTAL:NO

And this command with wildcards works with cl:

cl md5*.c

But fails with cilkpp:

cilkpp md5*.c

cl : Command line error D8036 : '/FoC:\\workspace\\Concurrent\\test\\cilk\\md5*.obj'
not allowed with multiple source files

The output of verbose shows that it is treating "md5*.c" as a single file, and attempts to set an output filename for it, but cl knows that it is multiple files and so refuses to set a single output filename:

CL Compiler

"C:\\Program Files (x86)\\Microsoft Visual Studio 9.0\\VC\\bin\\cl.exe" /c /Fo"C:\\workspace\\Concurrent\\test\\cilk\\md5*.obj" /I "C:\\Program Files (x86)\\Intel\\Cilk\\include" "md5*.c"

cilkpp should be expanding the wildcards itself before it decides which commands to pass on to CL.
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Barry Tannenbaum (Intel)'s picture

You're correct. Is this something you need a fix for, or something you can live with?

- Barry

n.sherlock's picture

I can live with it :)

Login to leave a comment.