https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63142

            Bug ID: 63142
           Summary: gcc-cilk can not spawn a function template
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yuantang at csail dot mit.edu

Created attachment 33437
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33437&action=edit
testbench to illustrate the bug

I have a following gcc (cilk branch) installed on my system. My OS is Ubuntu
14.04.
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/yuantang/tool_src/gcc-cilk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-cilk-src/configure
--prefix=/home/yuantang/tool_src/gcc-cilk --enable-languages=c,c++,fortran :
(reconfigured) ../gcc-cilk-src/configure
--prefix=/home/yuantang/tool_src/gcc-cilk --enable-languages=c,c++,fortran
--disable-multilib
Thread model: posix
gcc version 4.9.0 20130520 (experimental) (GCC) 

It looks like the cilk_spawn can not spawn a function template. It can spawn
any normal function but not function template, but icc and llvm-cilk can.

I compiled the attached testbench as follows:

$ gcc -o fib -fcilkplus -lcilkrts fib.cpp
/usr/bin/ld: /tmp/ccpNfrZC.o: undefined reference to symbol
'__cxa_rethrow@@CXXABI_1.3'
/usr/lib64/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Best!

-Yuan

Reply via email to