Segfaults on NetBSD with optimizations, works with -O0.
