PGI compiler internal error while no problem with g++

Hi, I’m using pgi compiler for a code with openACC derivative. I encounter the following compiler errors and I have no idea what is the issue. Before I use pgi compiler, I was use g++ and compiles with no problem. Could anyone help me on this?

PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/new: 169)
PGCC-S-0039-Use of undeclared variable (/usr/include/c++/7/new: 169)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/new: 169)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 116)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 116)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 671)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 671)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 116)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 116)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 671)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_vector.h: 671)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 206)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 210)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 210)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 211)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 211)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 211)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_uninitialized.h: 215)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/move.h: 48)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/move.h: 48)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC-S-0000-Internal compiler error. BAD sptr in var_refsym 0 (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC-F-0008-Error limit exceeded (/usr/include/c++/7/bits/stl_construct.h: 75)
PGCC/x86-64 Linux 19.4-0: compilation aborted

Some update from myself. I’ve identified the issue. I have two inline overloading functions (for the purpose of work on different data types). If I add openacc derivative inside the two inline function, I’ll get the compiler internal error. I am not expert in programming, I am not too sure it is my coding issue. Maybe I should avoid overloading functions.

Hi Karl,

You should never get a internal compiler error (ICE). If it is a programming error, the compiler should issue a more informative error message. If you could post or send to PGI Customer Support (trs@pgroup.com) a reproducing example, we can file a problem report and get it fixed.

Thanks,
Mat