From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23363 invoked by alias); 22 May 2015 07:31:20 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23326 invoked by uid 48); 22 May 2015 07:31:16 -0000 From: "asmwarrior at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56926] Crash (without ICE) while compiling Boost.Math Date: Fri, 22 May 2015 07:31:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: asmwarrior at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01873.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56926 --- Comment #13 from asmwarrior --- I did some further test with the condition I stated in comment 11. That is gcc 5.1. Now, I have pch.h.gch file (about 200M) already generated. First thing, I try to see whether preprocessor works OK, so I add the "-E" option. For test.cpp file ------ #include "pch.h" int main() { int a; int b; int c; a++; b++; } ------ Run the command: g++.exe -v -E -Wall -fexceptions -g -march=core2 -Wall -ID:\mingw-builds\boost_1_55_0 -Winvalid-pch -include pch.h test.cpp -o have-include.i Then I comment out the first line ------ //#include "pch.h" int main() { int a; int b; int c; a++; b++; } ------ Then run the command below: g++.exe -v -E -Wall -fexceptions -g -march=core2 -Wall -ID:\mingw-builds\boost_1_55_0 -Winvalid-pch -include pch.h test.cpp -o no-include.i Then I compare the result: Both "have-include.i" and "no-include.i" are about 7M, I see the they are nearly the same, expect the "have-include.i" have two extra lines. Here is the have-include.i ------ ... ... #pragma GCC diagnostic pop # 1 "" 2 # 1 "test.cpp" # 1 "pch.h" 1 # 2 "test.cpp" 2 int main() { int a; int b; int c; a++; b++; } ------- Here is no-include.i ------ ... ... #pragma GCC diagnostic pop # 1 "" 2 # 1 "test.cpp" int main() { int a; int b; int c; a++; b++; } ------ Now, I try to build those .i files to object files with those command: g++.exe -v -Wall -fexceptions -g -march=core2 -Wall -c no-include.i -o no-include.o g++.exe -v -Wall -fexceptions -g -march=core2 -Wall -c have-include.i -o have-include.o Result is: I get the same result "no-include.o" and "have-include.o". (Yes, they are exactly same in every bytes) Now, I did other test like below: g++.exe -v -Wall -fexceptions -g -march=core2 -Wall -ID:\mingw-builds\boost_1_55_0 -Winvalid-pch -include pch.h -c test.cpp -o have-include-c.o -save-temps Here, I have "-save-temps" put in the command option, I get no "have-include-c.o" file generated, also I get an empty "test.ii" generated. Here is the log: ------ ... ... D:\mingw-builds\boost_1_55_0 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/i686-w64-mi ngw32 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/backward e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/include e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/include-fixed e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../i686-w64-mingw32/include End of search list. ------ Now, if I remove the "-save-temps" option, and run below: g++.exe -v -Wall -fexceptions -g -march=core2 -Wall -ID:\mingw-builds\boost_1_55_0 -Winvalid-pch -include pch.h -c test.cpp -o have-include-c.o Still no "have-include-c.o" file, but this time, the log message has some extra lines: ------ ... ... D:\mingw-builds\boost_1_55_0 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/i686-w64-mi ngw32 e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../include/c++/5.1.1/backward e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/include e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/include-fixed e:\code\gcc\dongsheng-daily\gcc-5-win32\bin\../lib/gcc/i686-w64-mingw32/5.1.1/../../../../i686-w64-mingw32/include End of search list. GNU C++ (GCC) version 5.1.1 20150512 (i686-w64-mingw32) compiled by GNU C version 5.1.1 20150512, GMP version 5.1.3, MPFR version 3.1.2-p11, MPC version 1.0.3 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: af290162d8f9d7b22486b8d9679fb0bb ------ So, it looks like happens after the preprocessor has successfully read the pch file, when it(cc1plus.exe) try to start the parsing, it get crashed, but under my Windows XP, I don't see any message or dialog shown up when it crashed.