Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

ICE with OpenMP and missing increment

$
0
0

A typo led me to discover that if the increment (e.g., ++) on an OpenMP parallel for is missing, then the compiler reports an internal error rather a normal error message such as I would expect.  Here is a reduced repro case:

int main() {
    #pragma omp parallel for
    for ( int foo = 0; foo < 100; foo )
        /* pass */;            // ^ ICE if increment missing
}

When I attempt to compile it, I see the following:

% icpc -fopenmp ompice.cpp
ompice.cpp(4): internal error: bad pointer
          /* pass */;            // ^ ICE if increment missing
                    ^

compilation aborted for ompice.cpp (code 4)
%

The most recent build of the compiler that I have tested this on is "Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.0.0.120 Build 20180804", running on Ubuntu 18.04.  However, I also tried it on a machine with "17.0.4.196 Build 20170411" on Centos 7.3 and observed this behavior there as well.

Cheers,
- Andrew


Viewing all articles
Browse latest Browse all 1175

Trending Articles