Add tests and edit compilation in GCC