From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1EB163842423; Wed, 18 May 2022 19:56:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EB163842423 From: "giuliano.belinassi at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105649] New: Wrong .localentry address on powerpc64le with -fpatchable-function-entry=1 Date: Wed, 18 May 2022 19:56:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: giuliano.belinassi at gmail dot com 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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, 18 May 2022 19:56:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105649 Bug ID: 105649 Summary: Wrong .localentry address on powerpc64le with -fpatchable-function-entry=3D1 Product: gcc Version: 11.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: giuliano.belinassi at gmail dot com Target Milestone: --- (this bug triggered PR105647) With the following input file: ``` struct WinsockInterfaceClass { WinsockInterfaceClass(void); virtual int Get_Protocol(void) { return 0; }; }; WinsockInterfaceClass::WinsockInterfaceClass(void) { } ``` Saved as test.C, compiling with > powerpc64le-suse-linux-gcc-11 -c -fpatchable-function-entry=3D1 test.C Results in the following error: ``` /tmp/cczW6LfZ.s: Assembler messages: /tmp/cczW6LfZ.s:56: Error: .localentry expression for `_ZN21WinsockInterfaceClassC2Ev' is not a valid power of 2 ``` The reason for that maybe is because the addition of nops cause the address= of .localentry to be shifted according to how many nops inserted. OTOH > powerpc64le-suse-linux-gcc-11 -c -fpatchable-function-entry=3D2 test.C works.=