This file compiles just fine with earlier versions of G++. The compiler error appears at the end of a function which is the last function in the file. $ g++ -v Using built-in specs. Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) ... Command line: $ g++ -save-temps -o build/src/release/linux/2.6/64/x86/gcc/protocols/loophash/LoopHashMap.os -c -std=c++98 -pipe -ffor-scope -W -Wall -pedantic -Wno-long-long -O3 -ffast-math -funroll-loops -finline-functions -finline-limit=20000 -s -Wno-unused-variable -fPIC -DNDEBUG -Isrc -Iexternal/include -Isrc/platform/linux/64/gcc -Isrc/platform/linux/64 -Isrc/platform/linux -Iexternal/boost_1_38_0 -I/usr/local/include -I/usr/include src/protocols/loophash/LoopHashMap.cc g++: warning: -pipe ignored because -save-temps specified In file included from src/protocols/loophash/LoopHashMap.cc:18: src/protocols/loophash/LoopHashMap.hh:120: warning: type qualifiers ignored on function return type src/protocols/loophash/LoopHashMap.cc:360: warning: type qualifiers ignored on function return type In file included from external/boost_1_38_0/boost/unordered_map.hpp:17, from src/protocols/loophash/LoopHashMap.hh:22, from src/protocols/loophash/LoopHashMap.cc:18: external/boost_1_38_0/boost/unordered/detail/hash_table_impl.hpp: In member function ‘typename boost::unordered_detail::hash_types_equivalent_keys<std::pair<const Key, T>, Key, Hash, Pred, Alloc>::iterator boost::unordered_multimap<Key, T, Hash, Pred, Alloc>::insert(const std::pair<const Key, T>&) [with Key = long unsigned int, T = long unsigned int, Hash = protocols::match::bin_index_hasher, Pred = std::equal_to<long unsigned int>, Alloc = std::allocator<std::pair<const long unsigned int, long unsigned int> >]’: external/boost_1_38_0/boost/unordered/detail/hash_table_impl.hpp:101: warning: ‘<anonymous>’ may be used uninitialized in this function external/boost_1_38_0/boost/unordered/detail/hash_table_impl.hpp:210: note: ‘<anonymous>’ was declared here src/protocols/loophash/LoopHashMap.cc: In member function ‘void protocols::loophash::LoopHashMap::read_db(std::string, std::pair<long unsigned int, long unsigned int>, std::map<long unsigned int, bool, std::less<long unsigned int>, std::allocator<std::pair<const long unsigned int, bool> > >&)’: src/protocols/loophash/LoopHashMap.cc:436: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
Created attachment 23135 [details] -save-temps file (.ii) that produces this crash (too big to upload without bzipping it -- sorry!)
I'd love a suggestion on how the code could be changed so that I no longer get this segfault.
confirmed for 4.4.3 I get an ICE with g++ LoopHashMap.ii -O2 -funroll-loops -finline-functions -finline-limit=488 but not with g++ LoopHashMap.ii -O2 -funroll-loops -finline-functions -finline-limit=487 (the only difference is the inline-limit) (In reply to comment #2) > I'd love a suggestion on how the code could be changed so that I no longer get > this segfault. use a lower value for -finline-limit
Works on 4.6.
Works in 4.5.2.
It is caused by revision 142056: http://gcc.gnu.org/ml/gcc-cvs/2008-11/msg00765.html and is fixed/hidden by revision 145204: http://gcc.gnu.org/ml/gcc-cvs/2009-03/msg00711.html
Looks somewhat familiar: Program received signal SIGSEGV, Segmentation fault. 0x00000000007648d5 in cancel_loop_tree (loop=0xa5a5a5a5a5a5a5a5) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cfgloop.c:1305 1305 while (loop->inner) #0 0x00000000007648d5 in cancel_loop_tree (loop=0xa5a5a5a5a5a5a5a5) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cfgloop.c:1305 #1 0x00000000007648d1 in cancel_loop_tree (loop=0x7fffeeaee7e0) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cfgloop.c:1306 #2 0x00000000007677da in remove_path (e=0x7fffee3f2040) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/cfgloopmanip.c:353 #3 0x00000000009b7afe in peel_loop_completely (loop=0x7fffeeaee480) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/loop-unroll.c:506 #4 0x00000000009b73bd in peel_loops_completely (flags=2) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/loop-unroll.c:248 #5 0x00000000009b6aaf in unroll_and_peel_loops (flags=2) at /space/rguenther/src/svn/gcc-4_4-branch/gcc/loop-unroll.c:157 #6 0x00000000009ac87e in rtl_unroll_and_peel_loops () Likely a dup of PR42229, fixed with 2009-12-02 Richard Guenther <rguenther@suse.de> PR middle-end/42229 * cfgloopmanip.c (remove_path): Avoid cancelling loops twice.
(In reply to comment #7) > Likely a dup of PR42229 Backporting the PR42229 fix to gcc-4.4.5 eliminates the ICE for both this test case and the PR42229 one.
Fixed in 4.5+, 4.4 is no longer supported.
*** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla.