NVC++-F-0000-Internal compiler error. unhandled size for preparing max constant

When compiling the following OpenMP program with nvc++ from both 22.3 and 22.5 (and presumably other versions as well), we get an ICE:

// nvcpp_ice.cpp
int main (int argc, char *argv[]) {
    int a = 42;
    int &x = a;
    #pragma omp parallel reduction(min:x)
    for (int i = 0; i < 12; i++) {}
}
>/opt/nvidia/hpc_sdk/Linux_x86_64/22.3/compilers/bin/nvc++ -mp nvcpp_ice.cpp
"nvcpp_ice.cpp", line 6: warning: variable "x" was set but never used
      for (int i = 0; i < 12; i++) {}
      ^

NVC++-F-0000-Internal compiler error. unhandled size for preparing max constant      19  (nvcpp_ice.cpp: 6)
NVC++/x86-64 Linux 22.3-0: compilation aborted

Both Clang (10.0) and GCC (9.4.0) compiled without issues, as expected.

Thanks for the report wl14928.

Looks like a regression since the code first started failing in 21.9. May be related array reductions since we started adding support for them around this time.

I added a problem report, TPR #32181, and sent to engineering for investigation.

-Mat

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.