pgc++ crash related to array of objects on the stack.

I am encountering an unexplained pgc++ compiler error with a large C++ program that compiles correctly with gcc 4.8 and icc 11.

PGCC-S-0000-Internal compiler error. union_find_last_lp_per_handler:empty throw_bih 0 (_src/_solver/_Hexa/_hexaNS/_radiation/ViewFactorCalculator.C: 908)
PGCC/x86 Linux 16.10-0: compilation completed with severe errors
pgc+±Fatal-cpp2 completed with exit code 1

By iteratively blocking out chunks of code in the offending method I determined that the following innocent statement seems to be the root cause of the problem:

Vector3D locNodeC[12];

All this is doing is creating a fixed size array of “Vector3D” objects on the stack. If I replace this with a heap memory allocation (shown below) I am able to compile the code.

Vector3D* locNodeC = new Vector3D[12];

delete locNodeC;

Unfortunately I have not yet been able to reproduce the bug with a simple program, so the behavior must also depend on the contents of the Vector3D class or the calling method, which is a few thousand lines long. I will continue investigating this and try to put together a reproducer, but in the meantime I wanted to see if anyone else has encountered something like this.

Switching from the -fast to -O1 optimization level does not seem to help.