8012292: optimized build with GCC broken

Some #ifndef PRODUCT should be #ifdef ASSERT

Reviewed-by: kvn, twisti
5 files changed