Created attachment 32708 [details] -save-temps After I added the implementation of the BillboardRender constructor, g++ crashes while compiling. Command line: /opt/nspire/Ndless/ndless-sdk/toolchain/install/bin/arm-none-eabi-g++ -mcpu=arm926ej-s -I /home/fabian/.ndless/include -I /opt/nspire/Ndless/ndless-sdk/bin/../include -fPIC -fno-use-cxa-atexit -fno-exceptions -fno-rtti -mlong-calls -D _TINSPIRE -std=c++11 -O3 -g -Wall -W -marm -ffast-math -mcpu=arm926ej-s -fno-math-errno -fno-tree-vectorize -fomit-frame-pointer -flto -c billboardrenderer.cpp -o billboardrenderer.o arm-none-eabi-g++ -v: Using built-in specs. COLLECT_GCC=arm-none-eabi-g++ COLLECT_LTO_WRAPPER=/opt/nspire/Ndless/ndless-sdk/toolchain/install/lib/gcc/arm-none-eabi/4.9.0/lto-wrapper Target: arm-none-eabi Configured with: ../gcc-4.9.0/configure --target=arm-none-eabi --prefix=/opt/nspire/Ndless/ndless-sdk/toolchain/install --enable-interwork --enable-multilib --enable-languages=c,c++ --with-system-zlib --with-newlib --with-headers=../newlib-2.0.0/newlib/libc/include --disable-shared --with-gnu-as --with-gnu-ld --with-float=soft --disable-werror Thread model: single gcc version 4.9.0 (GCC) Constructor: BillboardRenderer::BillboardRenderer(std::map<uint8_t, std::tuple<unsigned int, unsigned int, const char*>> map) : map(map) { } I attached the files it generates with -save-temps.
Created attachment 32711 [details] -save-temps (assembler)
Created attachment 32712 [details] Preprocessed source
Forgot to paste the output: billboardrenderer.cpp:13:51: warning: unused parameter 'block' [-Wunused-parameter] AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, GLFix z) ^ billboardrenderer.cpp:13:64: warning: unused parameter 'x' [-Wunused-parameter] AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, GLFix z) ^ billboardrenderer.cpp:13:73: warning: unused parameter 'y' [-Wunused-parameter] AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, GLFix z) ^ billboardrenderer.cpp:13:82: warning: unused parameter 'z' [-Wunused-parameter] AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, GLFix z) ^ cc1plus: internal compiler error: Segmentation fault 0x91c79f crash_signal ../../gcc-4.9.0/gcc/toplev.c:337 0x6b5252 analyze_functions ../../gcc-4.9.0/gcc/cgraphunit.c:1043 0x6b6204 finalize_compilation_unit() ../../gcc-4.9.0/gcc/cgraphunit.c:2326 0x56bd78 cp_write_global_declarations() ../../gcc-4.9.0/gcc/cp/decl2.c:4611 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [billboardrenderer.o] Error 1
(In reply to Fabian Vogt from comment #3) > Forgot to paste the output: > billboardrenderer.cpp:13:51: warning: unused parameter 'block' > [-Wunused-parameter] > AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, > GLFix z) > ^ > billboardrenderer.cpp:13:64: warning: unused parameter 'x' > [-Wunused-parameter] > AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, > GLFix z) > ^ > billboardrenderer.cpp:13:73: warning: unused parameter 'y' > [-Wunused-parameter] > AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, > GLFix z) > ^ > billboardrenderer.cpp:13:82: warning: unused parameter 'z' > [-Wunused-parameter] > AABB BillboardRenderer::getAABB(const BLOCK_WDATA block, GLFix x, GLFix y, > GLFix z) > > ^ > cc1plus: internal compiler error: Segmentation fault > 0x91c79f crash_signal > ../../gcc-4.9.0/gcc/toplev.c:337 > 0x6b5252 analyze_functions > ../../gcc-4.9.0/gcc/cgraphunit.c:1043 > 0x6b6204 finalize_compilation_unit() > ../../gcc-4.9.0/gcc/cgraphunit.c:2326 > 0x56bd78 cp_write_global_declarations() > ../../gcc-4.9.0/gcc/cp/decl2.c:4611 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See <http://gcc.gnu.org/bugs.html> for instructions. > make: *** [billboardrenderer.o] Error 1 Works for me with gcc 4.9.4