https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99920
--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Richard Biener from comment #13) > So I can confirm the issue trying to build gcc10 packages for SLE11 ppc64 > (after much massaging). It works fine (past the failure point) on x86_64 > with the same versioned host compiler. It works fine when using gcc 4.8 > as host compiler (also available on SLES11). > > With the 4.3 based host compiler I see loads of > > [ 309s] In file included from ../../gcc/gimple-ssa-store-merging.c:168: > [ 309s] ../../gcc/rtl.h: In function 'rtx_def* rtx_init(rtx_def*, > rtx_code)': > [ 309s] ../../gcc/rtl.h:2966: warning: invalid access to non-static data > member 'rtx_def::u' of NULL object > [ 309s] ../../gcc/rtl.h:2966: warning: (perhaps the 'offsetof' macro was > used incorrectly) the same warning happens with -save-temps and the .ii file has # 2956 "../../gcc/rtl.h" extern long trunc_int_for_mode (long, machine_mode); extern poly_int64 trunc_int_for_mode (poly_int64, machine_mode); extern rtx plus_constant (machine_mode, rtx, poly_int64, bool = false); extern long get_stack_check_protect (void); extern rtx rtx_alloc (enum rtx_code ); inline rtx rtx_init (rtx rt, enum rtx_code code) { memset (rt, 0, __builtin_offsetof (struct rtx_def, u)); ((rt)->code = (code)); return rt; } a build / gdb inside qemu (ick) shows Program received signal SIGSEGV, Segmentation fault. 0x000000001218ecb4 in trim_filename ( name=0x1293bbf0 <vtable for (anonymous namespace)::pass_early_thread_jumps+16> "") at ../../gcc/diagnostic.c:1223 1223 while (q[0] == '.' && q[1] == '.' && IS_DIR_SEPARATOR (q[2])) (gdb) bt #0 0x000000001218ecb4 in trim_filename ( name=0x1293bbf0 <vtable for (anonymous namespace)::pass_early_thread_jumps+16> "") at ../../gcc/diagnostic.c:1223 #1 0x0000000012191cf0 in fancy_abort ( file=0x1293bbf0 <vtable for (anonymous namespace)::pass_early_thread_jumps+16> "", line=3768, function=0x12bce0c8 <cfun> "") at ../../gcc/diagnostic.c:1778 #2 0x0000000010943ac4 in operand_compare::hash_operand ( this=0x12c87ba8 <global_options>, t=0x1ffffde22800, hstate=..., flags=0) at ../../gcc/fold-const.c:3768 #3 0x0000000010944104 in inchash::add_expr (t=0x1ffffde22800, hstate=..., flags=0) at ../../gcc/fold-const.c:3919 #4 0x000000001102a2ec in iterative_hash_expr (tree=0x1ffffde22800, seed=0) at ../../gcc/tree.h:5207 #5 0x0000000011030e18 in tree_operand_hash::hash ( t=@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/tree-hash-traits.h:34 #6 0x0000000011f71eb8 in simple_hashmap_traits<default_hash_traits<tree_operand_hash>, <unnamed>::imm_store_chain_info*>::hash(tree_node * const&) ( h=@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/hash-map-traits.h:50 #7 0x0000000011f73378 in hash_map<tree_operand_hash, <unnamed>::imm_store_chain_info*, simple_hashmap_traits<default_hash_traits<tree_operand_hash>, <unnamed>::imm_store_chain_info*> >::get(tree_node * const&) (this=0x12cec998, k=@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/hash-map.h:184 #8 0x0000000011f846f4 in (anonymous namespace)::pass_store_merging::process_sto---Type <return> to continue, or q <return> to quit--- re (this=0x12cec940, stmt=0x1ffffdd61e50) at ../../gcc/gimple-ssa-store-merging.c:4883 #9 0x0000000011f84fec in (anonymous namespace)::pass_store_merging::execute ( this=0x12cec940, fun=0x1ffffdd90000) at ../../gcc/gimple-ssa-store-merging.c:5040 #10 0x0000000010df8740 in execute_one_pass (pass=0x12cec940) at ../../gcc/passes.c:2502 #3 0x0000000010944104 in inchash::add_expr (t=0x1ffffde22800, hstate=..., flags=0) at ../../gcc/fold-const.c:3919 3919 default_compare_instance.hash_operand (t, hstate, flags); (gdb) p t $1 = (const_tree) 0x1ffffde22800 (gdb) p debug_tree (t) [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] <addr_expr 0x1ffffde22800 type <pointer_type 0x1ffffdd5bda8 type <union_type 0x1ffffdd50d20 _FP_UNION_Q sizes-gimplified asm_written type_0 TI size <integer_cst 0x1ffffdab1068 constant 128> unit-size <integer_cst 0x1ffffdab1080 constant 16> align:128 warn_if_not_align:0 symtab:8191 alias-set 4 canonical-type 0x1ffffdd50d20 fields <field_decl 0x1ffffdae3a30 flt> context <translation_unit_decl 0x1ffffdd80078 trunckfdf2-sw.c> pointer_to_this <pointer_type 0x1ffffdd5bda8> chain <type_decl 0x1ffffdae3998 D.3040>> public unsigned DI size <integer_cst 0x1ffffdab1020 constant 64> unit-size <integer_cst 0x1ffffdab1038 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x1ffffdd5bda8> arg:0 <var_decl 0x1ffffff90bd0 _FP_UNPACK_RAW_2_flo type <union_type 0x1ffffdd50d20 _FP_UNION_Q> used read TI trunckfdf2-sw.c:46:31 size <integer_cst 0x1ffffdab1068 128> unit-size <integer_cst 0x1ffffdab1080 16> align:128 warn_if_not_align:0 context <function_decl 0x1ffffdd2ce00 __trunckfdf2>>> (gdb) down #2 0x0000000010943ac4 in operand_compare::hash_operand ( this=0x12c87ba8 <global_options>, t=0x1ffffde22800, hstate=..., flags=0) at ../../gcc/fold-const.c:3768 3768 gcc_assert (flags & OEP_HASH_CHECK); (gdb) l 3763 hash_operand (TREE_OPERAND (TREE_OPERAND (t, 0), 0), 3764 hstate, flags); 3765 /* Don't ICE on FE specific trees, or their arguments etc. 3766 during operand_equal_p hash verification. */ 3767 else if (!IS_EXPR_CODE_CLASS (tclass)) 3768 gcc_assert (flags & OEP_HASH_CHECK); (gdb) p tclass $3 = tcc_exceptional (gdb) p code $4 = ADDR_EXPR eh? Looks like some unfortunate mis-optimization of operand_compare::hash_operand ... :/