https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69028
Bug ID: 69028
Summary: ICE on *any* valid Cilk+ code C/C++: -fcilkplus is
incompatible with -fprofile-arcs
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: driver
Assignee: unassigned at gcc dot gnu.org
Reporter: yury.zaytsev at traveltainment dot de
Target Milestone: ---
I have found that Cilk+ programs are basically unusable with `--coverage`,
irrespective of whether it's a C or C++ program, therefore I'm marking this as
a driver issue.
Additionally, I set the severity to major, because I haven't found any
indication that profiling is unsupported with Cilk+ runtime and it's arguably
one of the fundamental features of the compiler. In comparison, OpenMP runtime
certainly does support profiling.
Affected are GCC 4.9 and GCC 5.x, I didn't have a chance to try on GCC 6 /
trunk.
$ cat ice.c
#include <cilk/cilk.h>
void parallel() {
}
int main() {
cilk_spawn parallel();
cilk_sync;
}
$ gcc-4.9 -fcilkplus ice.c
$ g++-4.9 -fcilkplus ice.c
$ gcc-5 -fcilkplus ice.c
$ g++-5 -fcilkplus ice.c
$ gcc-4.9 -fcilkplus -fprofile-arcs ice.c
ice.c: In function '_cilk_spn_0':
ice.c:9:1: internal compiler error: Segmentation fault
}
^
$ g++-4.9 -fcilkplus -fprofile-arcs ice.c
ice.c: In function '<built-in>':
ice.c:9:1: internal compiler error: Segmentation fault
}
^
$ gcc-5 -fcilkplus -fprofile-arcs ice.c
ice.c:9:1: internal compiler error: Segmentation fault
}
^
0x9a106f crash_signal
../../src/gcc/toplev.c:383
0x6b688f coverage_checksum_string
../../src/gcc/coverage.c:542
0x6b7a86 coverage_compute_profile_id(cgraph_node*)
../../src/gcc/coverage.c:625
0xb8ef3e init_node_map(bool)
../../src/gcc/value-prof.c:1308
0xa37b1e tree_profiling
../../src/gcc/tree-profile.c:545
0xa37b1e execute
../../src/gcc/tree-profile.c:670
$ g++-5 -fcilkplus -fprofile-arcs ice.c
ice.c:9:1: internal compiler error: Segmentation fault
}
^
0xa8842f crash_signal
../../src/gcc/toplev.c:383
0x79c71f coverage_checksum_string
../../src/gcc/coverage.c:542
0x79d916 coverage_compute_profile_id(cgraph_node*)
../../src/gcc/coverage.c:625
0xc75cae init_node_map(bool)
../../src/gcc/value-prof.c:1308
0xb1ed3e tree_profiling
../../src/gcc/tree-profile.c:545
0xb1ed3e execute
../../src/gcc/tree-profile.c:670
$ gcc-5 --version
gcc-5 (Ubuntu 5.2.1-23ubuntu1~12.04) 5.2.1 20151031
$ gcc-4.9 --version
gcc-4.9 (Ubuntu 4.9.2-0ubuntu1~12.04) 4.9.2