Compiles with GCC (with many warnings), but makes Clang segfault in compilation
Fixed Clang segfault and warnings