From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25F433972458; Tue, 17 Nov 2020 11:44:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25F433972458 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/97827] bootstrap error building the amdgcn-amdhsa offload compiler with LLVM 11 Date: Tue, 17 Nov 2020 11:44:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Tue, 17 Nov 2020 11:44:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97827 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ams at gcc dot gnu.org, | |burnus at gcc dot gnu.org --- Comment #2 from Tobias Burnus --- Changed in LLVM in https://reviews.llvm.org/D73999 cf. https://lists.llvm.org/pipermail/llvm-dev/2020-February/139390.html and related Binutils discussion: https://sourceware.org/legacy-ml/binutils/2020-02/msg00093.html LLVM commit 75af9da755721123e62b45cd0bc0c5e688a9722a: " GNU as started to emit warnings for changed sh_type or sh_flags in 2000. GNU as>=3D2.35 will emit errors for most sh_type/sh_flags change, and e= rror for entsize change." Cf. also http://web.mit.edu/rhel-doc/3/rhel-as-en-3/section.html A grep shows: .section .rodata.cst8 .section .rodata.cst8 .section .rodata.cst8,"aM",@progbits,8 Codewise, we have: mergeable_constant_section (mode=3DE_DFmode, align=3D64, flags=3D0) which calls: 884 flags |=3D (align / 8) | SECTION_MERGE; 885 return get_section (name, flags, NULL); with flags =3D=3D 32776. In the latter: flags |=3D SECTION_NAMED; =E2=86=92 2129928 and as "slot =3D section_htab->find_slot_with_hash" =E2=86=92 *slot =3D=3D = NULL: sect =3D ggc_alloc
(); sect->named.common.flags =3D flags; sect->named.name =3D ggc_strdup (name); sect->named.decl =3D decl; However, once the same function is called, we have: sect->common.flags =3D=3D 3178504 while still/again: flags =3D=3D 2129928 Next comes the call to: switch_to_section which ends with new_section->common.flags |=3D SECTION_DECLARED; which is 3178504 If we look at default_elf_asm_named_section, we find: /* If we have already declared this section, we can use an abbreviated form to switch back to it -- unless this section is part of a COMDAT groups, in which case GAS requires the full declaration every time. */ if (!(HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE)) && (flags & SECTION_DECLARED)) {=20 fprintf (asm_out_file, "\t.section\t%s\n", name); return; }=