https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82737
Bug ID: 82737 Summary: Compiler segfault on compilation of a certain file (full cause unknown) (file too large for upload, link provided) Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: brycm001 at gmail dot com Target Milestone: --- This is a bug that manifests itself in a segfault on an attempt to compile Manager.cpp from my GasSim project on MinGW-w64 MSYS2, over Windows 10 64-bit. GCC version: 7.2.0 Output of gcc -v: -------------- Using built-in specs. COLLECT_GCC=C:\msys64\mingw64\bin\gcc.exe COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.2.0/lto-wrapper.exe Target: x86_64-w64-mingw32 Configured with: ../gcc-7.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld Thread model: posix gcc version 7.2.0 (Rev1, Built by MSYS2 project) -------------- My .i file is (far) too big to be uploaded directly, so I'm going to give you a link to where I added it on my git repo: https://bitbucket.org/TheEdenCrazy/gassim/raw/293fc15913df18c79026d4a7084d9d21e3d53597/_share_gcc_bug/Manager.cpp.i -------------- Error message when running from cmake: C:\msys64\mingw64\bin\cmake.exe --build C:\repos\gassim\cmake-build-debug --target GasSim -- -j 4 [ 3%] Built target Boxer [ 37%] Built target glfw Scanning dependencies of target GasSim [ 41%] Building CXX object CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj [ 41%] Building CXX object CMakeFiles/GasSim.dir/src/main.cpp.obj [ 41%] Building CXX object CMakeFiles/GasSim.dir/src/Control/DebugHandlers.cpp.obj C:\repos\gassim\src\Control\Manager.cpp: In function 'std::__cxx11::string control::_getGLDebugTypeString(GLenum, GLenum, GLuint, const string&)': C:\repos\gassim\src\Control\Manager.cpp:181:5: internal compiler error: Segmentation fault } ^ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <https://sourceforge.net/projects/msys2> for instructions. mingw32-make.exe[3]: *** [CMakeFiles\GasSim.dir\build.make:113: CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj] Error 1 mingw32-make.exe[2]: *** [CMakeFiles\Makefile2:68: CMakeFiles/GasSim.dir/all] Error 2 mingw32-make.exe[1]: *** [CMakeFiles\Makefile2:80: CMakeFiles/GasSim.dir/rule] Error 2 mingw32-make.exe: *** [Makefile:185: GasSim] Error 2 ------------ CMake & make command that produces this error: "cmake -G "MSYS Makefiles" /c/repos/GasSim -DCMAKE_BUILD_TYPE=Debug" then "make -j4 src/Control/Manager.cpp.obj" ------------ Raw build command: "/C/msys64/mingw64/bin/g++.exe -DEIGEN_DONT_ALIGN -DGLM_ENABLE_EXPERIMENTAL -I/C/repos/gassim/include -I/C/repos/gassim/ext/glm -I/C/msys64/mingw64/include -I/C/repos/gassim/ext/glad/include -I/C/repos/gassim/ext/CEGUI/cegui/include -I/C/repos/gassim/ext/Boxer/include -I/C/repos/gassim/ext/glfw/include -O2 -static-libstdc++ -g -std=gnu++1z -o CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj -c /C/repos/gassim/src/Control/Manager.cpp" (I removed eigen from the project though, so the -DEIGEN_DONT_ALIGN part is irrelevant) ------------- Error message on running the single file target: " make -f CMakeFiles/GasSim.dir/build.make CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj make[1]: Entering directory '/home/Matti/build/GasSim' Building CXX object CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj /C/msys64/mingw64/bin/g++.exe -DEIGEN_DONT_ALIGN -DGLM_ENABLE_EXPERIMENTAL -I/C/repos/gassim/include -I/C/repos/gassim/ext/glm -I/C/msys64/mingw64/include -I/C/repos/gassim/ext/glad/include -I/C/repos/gassim/ext/CEGUI/cegui/include -I/C/repos/gassim/ext/Boxer/include -I/C/repos/gassim/ext/glfw/include -O2 -static-libstdc++ -g -std=gnu++1z -o CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj -c /C/repos/gassim/src/Control/Manager.cpp C:/repos/gassim/src/Control/Manager.cpp: In function 'std::__cxx11::string control::_getGLDebugTypeString(GLenum, GLenum, GLuint, const string&)': C:/repos/gassim/src/Control/Manager.cpp:175:5: internal compiler error: Segmentation fault } ^ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <https://sourceforge.net/projects/msys2> for instructions. make[1]: *** [CMakeFiles/GasSim.dir/build.make:111: CMakeFiles/GasSim.dir/src/Control/Manager.cpp.obj] Error 1 make[1]: Leaving directory '/home/Matti/build/GasSim' make: *** [Makefile:648: src/Control/Manager.cpp.obj] Error 2 " ------------- That should be all the information.