I compiled the exact same code with:
* GCC 4.7.3, with or without flto (link time optimization): All good, verified by total node count on a depth=12 run of 20 positions.
* GCC 4.8.1, with of without flto: both compiles are wrong. Neither have the correct node count, and both versions don't even have the same node counts (ie. they are both broken in different ways).
* not only the GCC 4.8 compiles are all broken, but they are slower than the ones of GCC 4.7.
So I have now a compiler that SILENTLY breaks my code. This is totally unacceptable. And there is no way to find out where the problem comes from, so I'm completely screwed as far as GCC is concerned. Perhaps a git bissect, but I really don't have the patience for that. The fact that GCC now makes broken and slower compiles, is enough to put me off it for the foreseeable future. Writing a chess program is a complicated enough task already, if we can't even rely on the compiler to produce correct code, we're doomed!
The good news however is Clang:
* Clang managed to produce a correct compile (correct node count).
But:
* clang does not accept GNU extensions (std=c++11 but not std=gnu++11). That means I need to throw away variable length arrays. They were so nice for triangular PV array on the stack, without them, I will now have to rely on an ugle global structure.
* clang does not accept flto (link time optimization). This was a great source of performance in GCC 4.7.3 when compiling my code, as I hate to have to inline everything: I prefer to rely on flto to do it for me.
* the Clang compile is 10% slower than GCC 4.7 !
Anyway, I guess I'll have to bite the bullet and only use Clang from now on, until an acceptable version of GCC resurfaces. I will miss VLA though
Has anyone experienced similar issues with GCC 4.8 ?

