From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 580A53858028; Wed, 7 Apr 2021 13:52:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 580A53858028 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99872] [11 Regression] optimizations sometimes lead to missing asm prefixes Date: Wed, 07 Apr 2021 13:52:13 +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: critical X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Wed, 07 Apr 2021 13:52:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99872 --- Comment #7 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:b51321bc5193b65b308a26663fc02f786ba6cc89 commit r11-8028-gb51321bc5193b65b308a26663fc02f786ba6cc89 Author: Jakub Jelinek Date: Wed Apr 7 15:51:15 2021 +0200 varasm: Fix up constpool alias handling [PR99872] Last year, I have added in r11-2944-g0106300f6c3f7bae5eb1c46dbd45aa07c94e1b15 (aka PR54201 fix) code to find bitwise duplicates in constant pool and output them as aliases instead of duplicating the data. Unfortunately this broke mingw32 -m32. On most targets, ASM_GENERATE_INTERNAL_LABEL with "LC" emits something = like *.LC123 and the targets don't add user label prefixes, so the aliases that we print should be something like .set .LC5, .LC6 or .set .LC5, .LC6 + 8 and I wasn't sure if ASM_OUTPUT_DEF can handle the * and therefore I ha= ve stripped it. But, on mingw32 -m32, ASM_GENERATE_INTERNAL_LABEL with "LC" emits *LC123 and the target has user label prefixes, which means what I wrote results in LC6: ... .set _LC5, _LC6 which results in unresolved symbols. I went through the ASM_OUTPUT_DEF definitions of all targets and all of them use assemble_name twice under the hood (with various differences on what they print before, in betwee= n or after those names). And assemble_name handles the name encoding proper= ly, so if we pass it ASM_OUTPUT_DEF (..., "*.LC123", "*.LC456+16") it will emit .LC123 and .LC456+16 and if we pass it "*LC789", it will emit LC789. 2021-04-07 Jakub Jelinek PR target/99872 * varasm.c (output_constant_pool_contents): Don't strip name encoding from XSTR (desc->sym, 0) or from label before passing those to ASM_OUTPUT_DEF.=