[forwarded from http://bugs.debian.org/PR498708] seen with 4.3 branch and trunk 20081130, building without -fipa-struct-reorg works. $ g++ -O3 -fwhole-program -fipa-struct-reorg xx.cc xx.cc:289: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions. $ g++ -O3 -fwhole-program -fipa-pta xx.cc /usr/include/c++/4.3/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer, std::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]': /usr/include/c++/4.3/bits/vector.tcc:283: internal compiler error: in initialize_flags_in_bb, at tree-into-ssa.c:437 Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.
Created attachment 16804 [details] preprocessed source
-fipa-pta does nothing ...
*** This bug has been marked as a duplicate of 32305 ***
Re-opening as the -fipa-struct-reorg case.
Confirmed. Reduced testcase (crashes with "-O2 -fwhole-program -fipa-struct-reorg"): ========================================================= template<int> struct A { char c; void foo(int); void bar(int i) { foo(i+1); } }; template<int> struct B : virtual A<0> {}; template<int T> inline void baz(B<T>& b, int i) { if (i) b.bar(0); } extern template class A<0>; extern template void baz(B<0>&, int); int main() { B<0> b; baz(b, 0); return 0; } ========================================================= GCC 4.3.x and 4.4.x segfault, while trunk produced the following ICE: bug.cc:23:1: internal compiler error: in build_data_structure, at ipa-struct-reorg.c:3387 Please submit a full bug report, [etc.]
The pass was removed by: 2011-03-23 Richard Guenther <rguenther@suse.de> * Makefile.in (IPA_TYPE_ESCAPE_H): Remove. (OBJS-archive): Remove ipa-struct-reorg.o and ipa-type-escape.o. (tree-ssa-alias.o): Do not depend on IPA_TYPE_ESCAPE_H. (alias.o): Likewise. (ipa-type-escape.o): Remove. (ipa-struct-reorg.o): Likewise. (GTFILES): Remove ipa-struct-reorg.c. * alias.c: Do not include ipa-type-escape.h. * tree-ssa-alias.c: Likewise. * common.opt (fipa-struct-reorg): Preserve for backward compatibility. * opts.c (finish_options): Do not reset flag_ipa_struct_reorg. * passes.c (init_optimization_passes): Remove ipa-struct-reorg and ipa-type-escape passes. * tree-pass.h (pass_ipa_type_escape): Remove. (pass_ipa_struct_reorg): Likewise. So closing as won't fix.