XCode Compiler Optimization Bug

Aaron Michalk's picture

We have had to work around a compiler optimization bug in XCode. It appears to be caused by versions of XCode starting sometime in Fall 2017. This also coincided with switching to OCC 7.2.0. In one instance adding [[clang::optnone]] to gp_Trsf::SetTransformation() fixed the problem. Some elements of the matrix were being incorrectly zeroed out. We have found other instances so we have had to turn optimizations down to O1 and rebuild the OCC libs. Has anyone else run into this?

abv's picture

Should be fixed by 29978

Hello Aaron,

This problem looks just the same as reported in issue #29978; the fix is already in master.
Thanks for reporting the issue anyway.
If you observe other places where the issue shows up, please let us know.

Besides, do you think we can / shall report this issue to Apple?
I wanted to do that, but have no access to MacOS computer to build a reproducer...
If you happen to report this issue to Apple or know that it is already registered, please add a link in comments to #29978.

Andrey

www.opencascade.com

Copyright 2011-2017
OPEN CASCADE SAS
Contact us