From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 347CF3857B8E; Wed, 21 Dec 2022 08:18:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 347CF3857B8E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1671610707; bh=HOKK1JmZ+pmEmsFh87k/+roeDSlPvKTBs8hJzn5xO8w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=huigjGb9S6psb5QuZx8Xd+OlTowvRJIPlOqOPvPC317LSA7oGGb12EzVzyTnf0wKH 9iTtk22HZiXRAAx1Wfwr/grwAKtTmVUfk71fnWVvuJT+pY3aNrHYdrgQCI7T4mJNHm MvM12KmCYdZ9jSMOM353N2xEvNp9rQ6keZsSftac= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108153] Profiled lto bootstrap failure with modula2 Date: Wed, 21 Dec 2022 08:18:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108153 --- Comment #11 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:88709c4a1e6f8b69a33897a1ab46b8d66c4569c4 commit r13-4824-g88709c4a1e6f8b69a33897a1ab46b8d66c4569c4 Author: Jakub Jelinek Date: Wed Dec 21 09:10:35 2022 +0100 modula2: Fix lto profiledbootstrap on powerpc64le-linux and s390x-linux [PR108153] Lto profiledbootstrap was failing for me on {powerpc64le,s390x}-linux w= ith modula 2 enabled, with: cc1gm2: internal compiler error: the location value is corrupt 0x11a3d2d m2assert_AssertLocation(unsigned int) ../../gcc/m2/gm2-gcc/m2assert.cc:40 0x11a3d2d m2statement_BuildAssignmentTree ../../gcc/m2/gm2-gcc/m2statement.cc:177 ICE. The problem was that caller (m2assert_AssertLocation used location_t M2Options_OverrideLocation (location_t); prototype with the libcpp/line-map.h typedef unsigned int location_t; typedef, but the callee defined in Modula 2 was using: TYPE location_t =3D INTEGER ; and PROCEDURE OverrideLocation (location: location_t) : location_t ; Now, on powerpc64le-linux unsigned int is returned and passed zero exte= nded into 64-bits, while signed int is returned and passed sign-extended into 64-bits and Modula 2 INTEGER is signed 32-bit type, so when the caller then compared M2Options_OverrideLocation (location) !=3D location and powerpc64le-linux performed the comparison as 64-bit compare, there was a mismatch for location_t of 0x8000007 or others with the MSB set. Fixed by making Modula 2 location_t a CARDINAL, which is 32-bit unsigned type. 2022-12-21 Jakub Jelinek PR modula2/108153 * gm2-gcc/m2linemap.def (location_t): Use CARDINAL instead of INTEGER.=