C++ Compiler Fails With an Assertion Compiling Google Test (Doc ID 1378137.1)

Last updated on AUGUST 03, 2016

Applies to:

Oracle Solaris Studio - Version Sun Studio 12 Update 1 to 12.2 [Release 12]
Information in this document applies to any platform.

Symptoms

When compiling Google test, C++ 5.10 and 5.11 asserts in the compiler frontend when debugging is enabled (-g).

Different assertions have been observed:

Signal 11:
while processing /opt/sunstudio12.1/prod/include/CC/Cstd/rw/tree.cc at line 0.

>> Signal 11:
while processing /opt/sunstudio12.1/prod/include/CC/Cstd/./algorithm.cc at line 0.

>> Signal 11:
while processing /opt/solstudio12.2/prod/include/CC/Cstd/deque.cc at line 0.



The problem shows up only when header files from "Google test" ("gtest") are included, and only when
#define GTEST_HAS_PARAM_TEST in gtest/internal/gtest-port.h is set to 0.

The problem shows up only when libCstd is used (default), the problem does not show up with -library=stlport4.

The problem shows up only with DWARF debugging symbols, it does not show up with -xdebugformat=stabs.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms