From: SourceForge.net <no...@so...> - 2007-12-06 06:41:55
|
Bugs item #1844604, was opened at 2007-12-05 16:58 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1844604&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: John Pye (jdpipe) Assigned to: Nobody/Anonymous (nobody) Summary: internal compiler error in main.cpp Initial Comment: Hi there I got this 'internal compiler error' Segfault with the following commandline: g++ -o main.o -c -g -Wall "-IC:\Program Files\Boost-1.34.1\include" "-IC:\Program Files\GnuWin32\include" main.cpp main.cpp:45: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. scons: building terminated because of errors. scons: *** [main.o] Error 1 * OS version: XP John@THUNDER ~/optx $ gcc -v Reading specs from c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/specs Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as --host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shared --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --enable-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug Thread model: win32 gcc version 3.4.5 (mingw special) John@THUNDER ~/optx $ ld -v GNU ld version 2.17.50 20060824 * mingw version MinGW-5.1.3.exe * build environment: MSYS John@THUNDER ~/optx $ uname -a MINGW32_NT-5.1 THUNDER 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown * small test case demonstrating the bug: will send preprocessed code via email to the person following up this bug. * mingw-runtime version: #define __MINGW32_VERSION 3.13 #define __MINGW32_MAJOR_VERSION 3 #define __MINGW32_MINOR_VERSION 13 * w32api version: #define __W32API_VERSION 3.10 #define __W32API_MAJOR_VERSION 3 #define __W32API_MINOR_VERSION 10 * any other detailed information pertinent to your experience with the bug Previously compiled this code on another Windows system with no change, only change is that I am using GnuWin32 GSL instead of locally MSYS-compiled copy. Cheers JP ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2007-12-06 19:41 Message: Logged In: YES user_id=11494 Originator: NO This appears to be dllimport issue, specifically with dllimport of explicit template specializations, like this in mirrorbundle.h (line 107) typedef ParametricTransform<MirrorBundle,ParametersMoveToNearest> TransformMoveToNearest; template<> extern __attribute__((dllimport)) MirrorBundle & TransformMoveToNearest::operator()(MirrorBundle &); There are two different problems 1) Older G++ has problem with vtable emission when an entry is a dllimport. This causes ICE that you see. Removing the dllimport from above template specialization importand others like it is workaround. 2) G++ 4.3.0 reports: mirrorbundle.h:111: error: explicit template specialization cannot have a storage class. The "extern" in "template<> extern __attribute__((dllimport))" is unnecessary and invalid C++. Is is it required by MSVC? ---------------------------------------------------------------------- Comment By: John Pye (jdpipe) Date: 2007-12-05 19:05 Message: Logged In: YES user_id=849068 Originator: YES Attached is a minimal example with preprocessed code. John@THUNDER ~/optx $ g++ example-pre.cpp [...]:45: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.mingw.org/bugs.shtml> for instructions. File Added: example-pre.cpp.bz2 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1844604&group_id=2435 |