Please note that -O0 (dash oh zero) is not a supported option, and is not equivalent to omitting all -O (or -xO) options. The -O0 option is primarily for the use of compiler support engineers in diagnosing incorrect compiler behavior. As a workaround for this compiler bug, please just omit all -O or (-xO) options when compiling the affected file.
This looks like bug 15760611, which I don't believe has yet been fixed in Studio 12.3, although it has been fixed in the development compiler that will become the next Studio release. Watch this space for an announcement of an Open Beta program for the next release.
If you have an Oracle service contract for Solaris Studio, you can file a bug report and an escalation via My Oracle Help, or your support channel.