Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jascha_Wetzel
Beginner
57 Views

ICE when using OMP before range-for

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
57 Views

Thank you for reporting this. I have entered this in our bug tracking system as DPD200239307. Judy
57 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
#