public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/108153] Profiled lto bootstrap failure with modula2 Date: Tue, 20 Dec 2022 15:28:44 +0000 [thread overview] Message-ID: <bug-108153-4-ISzUbiarYv@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-108153-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108153 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dje at gcc dot gnu.org, | |segher at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- What fails is: ./cc1gm2 -msecure-plt -quiet -dumpbase SYSTEM.mod -dumpbase-ext .mod -mtune=power8 -mcpu=power8 -version -fpim -fno-scaffold-main -fno-scaffold-dynamic -fno-scaffold-static -fno-m2-plugin -fdump-system-exports -B ./ -B /usr/ppc64le-redhat-linux/bin/ -c -fpim -fno-scaffold-main -fno-scaffold-dynamic -fno-scaffold-static -fno-m2-plugin -fdump-system-exports -I ../../gcc/m2/gm2-libs -I /usr/lib/gcc/ppc64le-redhat-linux/13/m2/m2pim -I /usr/lib/gcc/ppc64le-redhat-linux/13/m2/m2log -I /usr/lib/gcc/ppc64le-redhat-linux/13/m2/m2iso ../../gcc/m2/gm2-libs/SYSTEM.mod -o /tmp/ccgDXY6u.s and the ICE is because m2assert_AssertLocation inlined into m2statement_BuildAssignmentTree sees a difference on M2Options_OverrideLocation (location) != location location (in $r30) is 0x80000007, while M2Options_OverrideLocation returned (in $r3) 0xffffffff80000007 instead. M2Options_OverrideLocation ends with 0x00000000102396e0 <+32>: extsw r3,r3 before returning, so it clearly sign extends the 32-bit return value to 64-bit. And the caller compares whole 64-bits: 0x00000000101c7488 <m2statement_BuildAssignmentTree(location_t, tree, tree)+40>: mr r30,r3 0x00000000101c748c <m2statement_BuildAssignmentTree(location_t, tree, tree)+44>: mr r29,r4 0x00000000101c7490 <m2statement_BuildAssignmentTree(location_t, tree, tree)+48>: mr r31,r5 0x00000000101c7494 <m2statement_BuildAssignmentTree(location_t, tree, tree)+52>: ble 0x101c74a8 <m2statement_BuildAssignmentTree(location_t, tree, tree)+72> 0x00000000101c7498 <m2statement_BuildAssignmentTree(location_t, tree, tree)+56>: bl 0x102396c8 <M2Options_OverrideLocation(m2linemap_location_t)+8> 0x00000000101c749c <m2statement_BuildAssignmentTree(location_t, tree, tree)+60>: nop => 0x00000000101c74a0 <m2statement_BuildAssignmentTree(location_t, tree, tree)+64>: cmpd r3,r30 So, I bet there must be some mismatch on whether M2Options_OverrideLocation returns a signed or unsigned 32-bit value. I believe the powerpc64le-linux ABI (and probably various other ABIs) returns (and passes?) signed 32-bit values sign-extended from 32-bits to 64-bits, and returns (and passes?) unsigned 32-bit values zero-extended from 32-bits to 64-bits. Say x86_64-linux doesn't do this, the upper 32 bits when passing or returning 32-bit values are undefined.
next prev parent reply other threads:[~2022-12-20 15:28 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-17 7:57 [Bug modula2/108153] New: " jakub at gcc dot gnu.org 2022-12-17 8:00 ` [Bug modula2/108153] " jakub at gcc dot gnu.org 2022-12-17 22:09 ` jakub at gcc dot gnu.org 2022-12-18 9:32 ` gaius at gcc dot gnu.org 2022-12-19 8:38 ` marxin at gcc dot gnu.org 2022-12-19 17:02 ` jakub at gcc dot gnu.org 2022-12-20 15:28 ` jakub at gcc dot gnu.org [this message] 2022-12-20 15:37 ` jakub at gcc dot gnu.org 2022-12-20 15:39 ` jakub at gcc dot gnu.org 2022-12-20 16:35 ` segher at gcc dot gnu.org 2022-12-20 16:36 ` segher at gcc dot gnu.org 2022-12-20 18:01 ` gaius at gcc dot gnu.org 2022-12-21 8:18 ` cvs-commit at gcc dot gnu.org 2022-12-21 8:27 ` jakub at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-108153-4-ISzUbiarYv@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).