# Clang error in optimization



## Isaac Monteiro (Dec 4, 2015)

Hi,

I tried to compile this http://lolengine.net/wiki/oss/lolremez with clang, but using any optimization causes the program to behave in a very strange way and gives numerically erroneous results.
Compile without optimization produces a very slow binary, so I have to compile using g++48 to use optimization.

I tried compile with various versions of clang on FreeBSD and Debian.

What is causing this?

Thanks in advance.


----------



## junovitch@ (Dec 4, 2015)

You could try lang/clang37 to see if the behavior is improved there.  It sounds though as you have a reproducible error that should be reported to the LLVM folks so that it could get fixed in the upstream.


----------



## Isaac Monteiro (Dec 7, 2015)

Thank you junovitch.
I've tried several versions of lang/clang, but the error persists. I'm using Debian for now, but when the bug is fixed, I will go back to using FreeBSD.
For now I do not have much time to report this error to the LLVM folks but hopefully someone who has time to do so to help make the clang more stable.
Thanks.


----------



## junovitch@ (Dec 7, 2015)

"Someone" has to be "somebody" or else the issue may not be fixed.


----------



## kpa (Dec 8, 2015)

Yep, you get the software without having to pay for it but it's not completely free. The cost is that if you want to have things fixed or improved you have to participate yourself in the development.


----------

