Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

ICE when using OMP before range-for

Jascha_Wetzel
Beginner
363 Views

ICC Version 13.0.1.119 Build 20121008

[cpp]
#include <vector>
#include <memory>

class A
{
public:
    void f(std::shared_ptr<A>)
    {}
};

int main()
{
    std::vector<int> v;
    auto num = v.size();
    #pragma omp parallel for
    for ( size_t i = 0; i < num; ++i )
        ++v;

    std::vector<std::shared_ptr<A>>
        tmp;
    for ( auto c : tmp )
        c->f(c);
}
[/cpp]

results in

[plain]
ICE_omp_before_range_for.cpp
ICE_omp_before_range_for.cpp(23): internal error: assertion failed at: "shared/cfe/edgcpfe/checkdir.c", line 5406

  }
  ^
[/plain]

0 Kudos
2 Replies
Judith_W_Intel
Employee
363 Views
Thank you for reporting this. I have entered this in our bug tracking system as DPD200239307. Judy
0 Kudos
Shenghong_G_Intel
363 Views

FYI. The issue is fixed in v14.x and latest v15.0.

# source /opt/intel/composer_xe_2013.1.117/bin/compilervars.sh intel64
# icc -v
icc version 13.0.1 (gcc version 4.7.0 compatibility)
# icc temp.cpp -openmp -std=c++11 -c
temp.cpp(20): internal error: assertion failed at: "shared/cfe/edgcpfe/checkdir.c", line 5406

  }
  ^

compilation aborted for temp.cpp (code 4)
# source /opt/intel/composer_xe_2013_sp1.1.106/bin/compilervars.sh intel64
# icc -v
icc version 14.0.1 (gcc version 4.8.0 compatibility)
# icc temp.cpp -openmp -std=c++11 -c
# source /opt/intel/composer_xe_2015.1.133/bin/compilervars.sh intel64
# icc -v
icc version 15.0.1 (gcc version 4.8.1 compatibility)
# icc temp.cpp -openmp -std=c++11 -c
#

 

0 Kudos
Reply