Compiler Bug

Compiler Bug

The attached code has a fair number of bugs in it, but it also generates a compiler error:

cilk++ -W -Wall -Werror -g -O3 csort.cilk -o csort.par

cc1plus: warnings being treated as errors

qsort.h: In function 'void cilk __cilk_spawn_copy_003(size_t, size_t, void*, long unsigned int, long unsigned int, char*, size_t (* __restrict__)[2][( + 1u)], size_t (* __restrict__)[2][( + 1u)], volatile __cilkrts_frame_t*)':
qsort.h:186: warning: '' is used uninitialized in this function
qsort.h:186: warning: '' is used uninitialized in this function
qsort.h: In function 'void cilk __cilk_spawn_par_prefix_002(size_t, long unsigned int, long unsigned int, size_t (* __restrict__)[2][( + 1u)], size_t (* __restrict__)[2][( + 1u)], volatile __cilkrts_frame_t*)':
qsort.h:176: internal compiler error: in make_decl_rtl, at varasm.c:1015
Please submit a full bug report,
with preprocessed source if appropriate.
This compiler version is 4.2.4 (Cilk Arts build 8503)
See for instructions.

AttachmentSize
Downloadapplication/octet-stream cilk-bug.tar.gz28.16 KB
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

It looks like the compiler can't handle some spawns that reference variable length arrays. As a workaround you can copy the value to a variable outside the spawn statement and reference the variable in the spawn.

size_t *c0 = comparisons[0];

cilk_spawn ...(..., c0, ...);

Leave a Comment

Please sign in to add a comment. Not a member? Join today