From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9D18B3857830; Thu, 8 Apr 2021 10:53:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9D18B3857830 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/99920] [10 regression] ICE building gcc 10 on power 7 BE Date: Thu, 08 Apr 2021 10:53:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: 10.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Apr 2021 10:53:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99920 --- Comment #14 from Richard Biener --- (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). >=20 > With the 4.3 based host compiler I see loads of >=20 > [ 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 =3D 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 =3D (code)); return rt; } a build / gdb inside qemu (ick) shows Program received signal SIGSEGV, Segmentation fault. 0x000000001218ecb4 in trim_filename ( name=3D0x1293bbf0 "") at ../../gcc/diagnostic.c:1223 1223 while (q[0] =3D=3D '.' && q[1] =3D=3D '.' && IS_DIR_SEPARATOR (q[= 2])) (gdb) bt #0 0x000000001218ecb4 in trim_filename ( name=3D0x1293bbf0 "") at ../../gcc/diagnostic.c:1223 #1 0x0000000012191cf0 in fancy_abort ( file=3D0x1293bbf0 "", line=3D3768, function=3D0x12bce= 0c8 "") at ../../gcc/diagnostic.c:1778 #2 0x0000000010943ac4 in operand_compare::hash_operand ( this=3D0x12c87ba8 , t=3D0x1ffffde22800, hstate=3D..., f= lags=3D0) at ../../gcc/fold-const.c:3768 #3 0x0000000010944104 in inchash::add_expr (t=3D0x1ffffde22800, hstate=3D.= ..,=20 flags=3D0) at ../../gcc/fold-const.c:3919 #4 0x000000001102a2ec in iterative_hash_expr (tree=3D0x1ffffde22800, seed= =3D0) at ../../gcc/tree.h:5207 #5 0x0000000011030e18 in tree_operand_hash::hash ( t=3D@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/tree-hash-traits.h:34 #6 0x0000000011f71eb8 in simple_hashmap_traits, ::imm_store_chain_info*>::hash(tree_node * const&) ( h=3D@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/hash-map-traits.h:50 #7 0x0000000011f73378 in hash_map::imm_store_chain_info*, simple_hashmap_traits, ::imm_store_chain_info*> >::get(tree_node * const&) (this=3D0x12ce= c998,=20 k=3D@0x3fffffffe220: 0x1ffffde22800) at ../../gcc/hash-map.h:184 #8 0x0000000011f846f4 in (anonymous namespace)::pass_store_merging::process_sto---Type to continue, or= q to quit--- re (this=3D0x12cec940, stmt=3D0x1ffffdd61e50) at ../../gcc/gimple-ssa-store-merging.c:4883 #9 0x0000000011f84fec in (anonymous namespace)::pass_store_merging::execut= e ( this=3D0x12cec940, fun=3D0x1ffffdd90000) at ../../gcc/gimple-ssa-store-merging.c:5040 #10 0x0000000010df8740 in execute_one_pass (pass=3D0x12cec940) at ../../gcc/passes.c:2502 #3 0x0000000010944104 in inchash::add_expr (t=3D0x1ffffde22800, hstate=3D.= ..,=20 flags=3D0) at ../../gcc/fold-const.c:3919 3919 default_compare_instance.hash_operand (t, hstate, flags); (gdb) p t $1 =3D (const_tree) 0x1ffffde22800 (gdb) p debug_tree (t) [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] unit-size align:128 warn_if_not_align:0 symtab:8191 alias-set 4 canonical-type 0x1ffffdd50d20 fields context pointer_to_this chain > public unsigned DI size unit-size align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x1ffffdd5bda8> arg:0 used read TI trunckfdf2-sw.c:46:31 size unit-size align:128 warn_if_not_align:0 context >> (gdb) down #2 0x0000000010943ac4 in operand_compare::hash_operand ( this=3D0x12c87ba8 , t=3D0x1ffffde22800, hstate=3D..., f= lags=3D0) 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 =3D tcc_exceptional (gdb) p code $4 =3D ADDR_EXPR eh? Looks like some unfortunate mis-optimization of operand_compare::hash_operand ... :/=