I was trying to use built-in functions for arrays in cilkplus. Consider the following code as example:
#include<stdio.h>
#include<stdlib.h>
#include<cilk/cilk.h>
int main()
{
int a[10] = {10,3,14,7,9,5,65,12,6,52};
int t;
t = __sec_reduce_max(a[0:3]);
cilk_for(int i=0;i<11;i++)
{
printf("something\n");
}
return 0;
}
On compiling the above program i got "internal compiler error: Segmentation fault"
But, if i replace the "cilk_for" with just "for" then the program is compiled and executed successfully. I observed that whenever i'm using cilk_for and the function __sec_reduce_max() within the same program, i get this error. Is this a bug
I think the question is similar to this one? But what's the solution? what should i do? I'm using cilkplus-4_8-branch in linux 64 bit system.