Work around code with undefined behavior
- Fix some code with undefined behavior
- Build with -fno-strict-aliasing
- Disable various compiler tree optimizations that trigger reproducible
crashes in gtkwave without generating compiler warnings (#1064090)