0029825: Foundation Classes, NCollection_Vec4 - workaround gcc optimizer issues with...
authorkgv <kgv@opencascade.com>
Wed, 30 May 2018 15:59:12 +0000 (18:59 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 14 Jun 2018 11:03:11 +0000 (14:03 +0300)
commitbc37935836a82b8c548ee7617dcc4d95affbddca
treea5a1f49be389198a2e85c50bebad1c5b2d876c07
parent4e73d75b03399fe7424b6f73bdc48e3c47e91f27
0029825: Foundation Classes, NCollection_Vec4 - workaround gcc optimizer issues with xyz() method

Methods of NCollection_Vec3 and NCollection_Vec3 that returned reference to internal buffer as vector of lower dimension (non-const xy(), xyz() etc.) are eliminated.
Use of these methods could led to generation of incorrect binary code by GCC.
Instead added new method SetValues() accepting vector of lower dimension and additional value.

DRAW test command QANColTestVec4 reproducing one situation where the bug occurs is added, along with a test case.
src/NCollection/NCollection_Vec3.hxx
src/NCollection/NCollection_Vec4.hxx
src/OpenGl/OpenGl_BackgroundArray.cxx
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Material.hxx
src/OpenGl/OpenGl_Text.cxx
src/QANCollection/QANCollection_Test.cxx
src/Select3D/Select3D_SensitivePrimitiveArray.cxx
tests/collections/n/vec4 [new file with mode: 0644]