From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B1FE93858C74; Tue, 7 Nov 2023 08:55:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B1FE93858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699347331; bh=IHwILosQWYwVvJa+9/Xu393VrqYDb5H1OW/WsBICHeQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hJms9NXY+4qk6ALzbFZG34HlHEaBgTb+ktNKoXMSdAf2geJc6S3blctAYVYTGEUNT aQkNltvaZBRlzexEzuZ15WOSn4lxHRPF0m6gLSvfRy3PzCIDMvMWUJBDJkJoO++17R HpiX0y5mhJ+yExAVsZuyuWea+2s9jJ1Isqh90eds= From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112411] ICE: SIGSEGV with --param=min-nondebug-insn-uid=2147483647 on powerpc64le-unknown-linux-gnu Date: Tue, 07 Nov 2023 08:55:30 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed bug_status cf_reconfirmed_on 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112411 Kewen Lin changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2023-11-07 CC| |linkw at gcc dot gnu.org, | |rguenth at gcc dot gnu.org, | |rsandifo at gcc dot gnu.org --- Comment #2 from Kewen Lin --- Confirmed, can be reproduced with native powerpc64 compiler. It fails at the code: 352=E2=94=82 if (insn_lengths_max_uid > INSN_UID (insn)) 353=E2=94=9C=E2=94=80=E2=94=80=E2=94=80> return insn_lengths[INSN_UID (ins= n)]; p INSN_UID (insn) $1 =3D (int &) @0x7ffff5830384: -2147483641 p insn_lengths_max_uid $2 =3D 0 p insn_lengths $3 =3D (int *) 0x0 The given --param=3Dmin-nondebug-insn-uid=3D2147483647 causes the assigned = insn uid becomes negative. At that time, insn_lengths isn't ready yet, it can workar= ound with further checking insn_lengths first. I noticed that those uid variables are of signed type, such as: x_cur_insn_uid @ emit_status x_cur_debug_insn_uid @ emit_status insn_uid @ rtx_def shouldn't they be with unsigned type instead? or is it by design?=