0

[已修复]- 评论中给出的解释

[更新错误截图]
使用 gcc/5.4.0 编译时出现编译错误。以下是报告的错误:

内部编译器错误:在 lower_stmt 中,在 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__

我认为这是一个编译器错误,但我想知道如何规避这个错误并让代码执行警告和错误。

错误截图: 错误截图

4

1 回答 1

0

似乎报告的错误已在 GCC 6.X 版本中解决。

仅供参考,如果您遇到类似问题,请尝试在最新版本的 GCC 上重现该错误,以确认它是否早先报告和纠正。

于 2017-01-15T03:53:17.810 回答