Compiles with clang 3.2 but crashes