http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59984

            Bug ID: 59984
           Summary: OpenMP and Cilk Plus SIMD pragma makes loop incorrect
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evstupac at gmail dot com

GCC generates incorrect code for the SIMD loop (#pragma [omp] simd) with
function call that have pointer parameters.

(test case attached)

gcc test.c foo.c -fcilkplus -O3
./a.out ; echo $?
1
gcc test.c foo.c -fcilkplus -O0
./a.out ; echo $?                                                               
0

the same for -fopenmp -DENABLE_OMP instead of -fcilkplus

Moreover g++ crashes on the test:

g++ test.c -fcilkplus -O3 -c
test.c: In function 'int main()':
test.c:10:5: error: dead STMT in EH table
 int main()
     ^
# .MEM_11 = VDEF <.MEM_39>
foo (_10, &v1, &v2);
test.c:10:5: internal compiler error: verify_gimple failed
0xb774b3 verify_gimple_in_cfg(function*)
        /export/users/mstester/stability/svn/trunk/gcc/tree-cfg.c:4853
0xa9fc52 execute_function_todo
        /export/users/mstester/stability/svn/trunk/gcc/passes.c:1853
0xaa05a3 execute_todo
        /export/users/mstester/stability/svn/trunk/gcc/passes.c:1887
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to