Hide Forgot
Created attachment 1140541 [details] The g++ preprocess output. Description of problem: When compile a C++11 program, the G++ 4.8.2 failed at a template instantiation. Helper.hpp: In instantiation of 'struct Caller<int (*)(int), std::tuple<MyAnyType&>&, std::tuple<int>&, 1ul>': Helper.hpp:102:130: required from 'auto Wrapper2(FuncT, Args& ...) [with FuncT = int (*)(int); Args = {MyAnyType}]' speed.cpp:38:41: required from here Helper.hpp:73:8: internal compiler error: in gen_type_die_with_usage, at dwarf2out.c:19499 struct Caller<FuncT, ParamTuple, CallTypes, 1> ^ Please submit a full bug report, Version-Release number of selected component (if applicable): g++ 4.8.2 How reproducible: g++ -g -std=c++11 -o speed speed.cpp Client.o Steps to Reproduce: 1. 2. 3. Actual results: Compile failure Expected results: Additional info: Attached the preprocess file
This was fixed in http://gcc.gnu.org/r198099 or in http://gcc.gnu.org/r198098. The former doesn't seem to be backportable.
Verified that this still fails with r198098. In any case, this seems like ICE-on-invalid, thus I'm afraid low priority.
Hi Marek Thanks for you prompt response. Actually, when I remove the -g flag, the compilation works. So I doubt the corruption was caused by the debug symbol generation. Any idea? Regards, Johnny
> Actually, when I remove the -g flag, the compilation works. So I doubt the > corruption was caused by the debug symbol generation. That is of course a sing that it is very much related to debug info generation. Anyway, you are trying to compile C++14 source by a compiler which has almost no C++14 support (and all it has is experimental), and use -std=c++11, the internal error is only during error recovery from this. Better use a Developer Toolset compiler that has full C++14 support.
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.