Yes it is a bug, and has been fixed as a side-effect of fixing bug: 15613122 - SUNBT6913992 compiler error returning structs with const fields
However, there are no current plans to backport the fix for a patch to OSS12.3.