Although IPA-SRA is not yet enabled for general public... Regression test on alpha with ipa-sra enabled in opts.c and with patch from OR41395, comment $42 [1] applied to fix bootstrap failure with va_args, shows a couple of segfaults in libstdc++ testsuite.
Soon-to-be-attached preprocessed c++ file fails with a crosscompiler from x86_64-pc-linux-gnu to alpha-linux-gnu with "-O2 -g -std=c++0x": ~/gcc-build-alpha-c++/gcc/cc1plus -O2 -g -quiet -std=c++0x 24803.ii In file included from /home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/functional:70:0, from /home/uros/gcc-svn/trunk/libstdc++-v3/testsuite/20_util/reference_wrapper/24803.cc:22: /home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/tr1_impl/functional: In function typename __gnu_cxx::__enable_if<((std::is_member_pointer::value && (! std::is_function::value)) && (! std::is_function::value)), typename std::result_of<_Functor(_ArgTypes ...)>::type>::__type std::__invoke(_Functor&, _Args& ...) [with _Functor = int (test_type::*)(), _Args = test_type*, typename __gnu_cxx::__enable_if<((std::is_member_pointer::value && (! std::is_function::value)) && (! std::is_function::value)), typename std::result_of<_Functor(_ArgTypes ...)>::type>::__type = int]: /home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/tr1_impl/functional:464:36: internal compiler error: Segmentation fault Please submit a full bug report, ... Starting program: /home/uros/gcc-build-alpha-c++/gcc/cc1plus -O2 -g -quiet -std=c++0x 24803.ii Program received signal SIGSEGV, Segmentation fault. 0x00000000004b0ae7 in function_parameter_expanded_from_pack_p (param_decl=0x7ffff21dea20, pack=0x7ffff2824870) at ../../gcc-svn/trunk/gcc/cp/pt.c:2679 2679 return DECL_PARM_INDEX (pack) == DECL_PARM_INDEX (param_decl); Missing separate debuginfos, use: debuginfo-install glibc-2.10.1-5.x86_64 (gdb) bt #0 0x00000000004b0ae7 in function_parameter_expanded_from_pack_p (param_decl=0x7ffff21dea20, pack=0x7ffff2824870) at ../../gcc-svn/trunk/gcc/cp/pt.c:2679 #1 0x00000000006bc559 in gen_formal_parameter_pack_die (next_arg=<value optimized out>, subr_die=<value optimized out>, pack_arg=<value optimized out>, parm_pack=<value optimized out>) at ../../gcc-svn/trunk/gcc/dwarf2out.c:15562 #2 gen_subprogram_die (next_arg=<value optimized out>, subr_die=<value optimized out>, pack_arg=<value optimized out>, parm_pack=<value optimized out>) at ../../gcc-svn/trunk/gcc/dwarf2out.c:16105 #3 0x00000000006bad5d in gen_decl_die (decl=0x7ffff216f800, origin=0x0, context_die=0x7ffff2a4d360) at ../../gcc-svn/trunk/gcc/dwarf2out.c:17641 #4 0x00000000006be194 in dwarf2out_abstract_function (decl=0x7ffff216f800) at ../../gcc-svn/trunk/gcc/dwarf2out.c:15727 #5 0x0000000000a5a2ea in expand_call_inline (bb=<value optimized out>, stmt=0x7ffff2074780, id=0x7fffffffdda0) at ../../gcc-svn/trunk/gcc/tree-inline.c:3820 (gdb) frame 0 #0 0x00000000004b0ae7 in function_parameter_expanded_from_pack_p (param_decl=0x7ffff21dea20, pack=0x7ffff2824870) at ../../gcc-svn/trunk/gcc/cp/pt.c:2679 2679 return DECL_PARM_INDEX (pack) == DECL_PARM_INDEX (param_decl); (gdb) p debug_tree (pack) <parm_decl 0x7ffff2824870 __args type <type_pack_expansion 0x7ffff29a9180 type <reference_type 0x7ffff29a8900 type <template_type_parm 0x7ffff29a4480 _Args> unsigned DI size <integer_cst 0x7ffff29749f0 constant 64> unit size <integer_cst 0x7ffff2974a20 constant 8> align 64 symtab 0 alias set -1 canonical type 0x7ffff252e000> type_0 type_6 VOID align 8 symtab 0 alias set -1 structural equality chain <tree_list 0x7ffff24809f0>> used decl_1 VOID file /home/uros/gcc-build/alphaev68-unknown-linux-gnu/libstdc++-v3/include/tr1_impl/functional line 278 col 39 align 8 context <function_decl 0x7ffff2976500 __invoke> > $1 = void (gdb) p debug_tree (param_decl) <parm_decl 0x7ffff21dea20 ISRA.11 type <pointer_type 0x7ffff23b8480 type <record_type 0x7ffff23b7840 test_type asm_written type_5 type_6 QI size <integer_cst 0x7ffff2974660 constant 8> unit size <integer_cst 0x7ffff2974690 constant 1> align 8 symtab -230694144 alias set 13 canonical type 0x7ffff23b7840 fields <type_decl 0x7ffff23b7cc0 test_type> full-name "struct test_type" X() X(constX&) this=(X&) n_parents=0 use_template=0 interface-unknown pointer_to_this <pointer_type 0x7ffff23b8480> reference_to_this <reference_type 0x7ffff21b5540> chain <type_decl 0x7ffff23b7c00 test_type>> sizes-gimplified asm_written public unsigned type_6 DI size <integer_cst 0x7ffff29749f0 constant 64> unit size <integer_cst 0x7ffff2974a20 constant 8> align 64 symtab -230693856 alias set 7 canonical type 0x7ffff23b8480 pointer_to_this <pointer_type 0x7ffff22b0e40> reference_to_this <reference_type 0x7ffff22b0780>> used unsigned ignored abstract DI file (null) line 0 col 0 size <integer_cst 0x7ffff29749f0 64> unit size <integer_cst 0x7ffff2974a20 8> align 64 context <function_decl 0x7ffff216f800 __invoke> arg-type <pointer_type 0x7ffff23b8480>> $2 = void Please note the name of param_decl argument (ISRA.11). I sincerely don't know which component is responsible for this failure, so I'll mark this PR as c++. Looking at the backtrace and due to the fact that "-g" is needed, recent debug changes should be considered, too. Version signature: xgcc (GCC) 4.5.0 20090930 (experimental) [trunk revision 152332] [1] http://gcc.gnu.org/bugzilla/attachment.cgi?id=18676&action=view -- Summary: IPA-SRA segfaults in libstdc++ tests (i.e. 20_util/reference_wrapper/24803.cc) Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ubizjak at gmail dot com GCC build triplet: x86_64-pc-linux-gnu GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: alphaev68-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41527