0
[修正] - 在评论内部编译错误C++的Cilk加
给出解释[更新,错误画面]
使用gcc/5.4.0编译时,我得到一个编译错误。以下是报告的错误:
internal compiler error: in lower_stmt, at gimple-low.c:397 cilk_spawn m_sparsify_graph_helper__(mdl, n_pa, n_ch, score2beat);
以下是导致代码片段错误:
void m_sparsify_graph_helper__(MDL mdl, set_type pa, set_type ch, std::vector<double> score2beat) {
//cilk::reducer<cilk::op_list_append<RNode_>> rlist;
//"rlist" - defined in the class as a private variable
if (ch == 0) { return; }
set_type n_ch = ch;
// Some more code -- which I am very sure is not causing error
int lsb = n_ - 1;
for (; lsb >= 0; --lsb) { if (in_set(pa, lsb)) { break; } }
if (lsb == n_ - 1) { return; }
set_type n_pa = set_add(pa, lsb + 1);
int n_pa_sz = set_size(n_pa);
if (n_pa_sz >= n_) { return; }
BitCombination comb(n_pa, n_pa_sz, n_);
for (;;) {
n_pa = comb.data();
// If cilk_spawn keyword removed it compiles fine.
cilk_spawn m_sparsify_graph_helper__(mdl, n_pa, n_ch, score2beat);
if (!comb.next() || in_set(n_pa, n_ - 1)) { break; }
}
}// m_sparsify_graph_helper__
我以为这是一个编译器错误,但我想知道什么是规避这种错误的方式,让代码执行警告和错误免费。
无论源代码是否有效,ICE始终是编译器错误。报告。 –
这就是所有关于内部错误的说法吗? –
@TrevorHickey添加了完整的错误截图。 – letsBeePolite