From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8ED603852754; Tue, 14 Jun 2022 15:12:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8ED603852754 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/105970] ICE in ix86_function_arg, at config/i386/i386.cc:3351 Date: Tue, 14 Jun 2022 15:12:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com 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: 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: Tue, 14 Jun 2022 15:12:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105970 --- Comment #2 from H.J. Lu --- (In reply to Uro=C5=A1 Bizjak from comment #1) > Probably something like: >=20 > diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc > index 3d189e124e4..f158cc3aaea 100644 > --- a/gcc/config/i386/i386.cc > +++ b/gcc/config/i386/i386.cc > @@ -3348,7 +3348,7 @@ ix86_function_arg (cumulative_args_t cum_v, const > function_arg_info &arg) > if (POINTER_TYPE_P (arg.type)) > { > /* This is the pointer argument. */ > - gcc_assert (TYPE_MODE (arg.type) =3D=3D Pmode); > + gcc_assert (TYPE_MODE (arg.type) =3D=3D ptr_mode); This looks reasonable since pointer mode should be ptr_mode. > /* It is at -WORD(AP) in the current frame in interrupt and > exception handlers. */ > reg =3D plus_constant (Pmode, arg_pointer_rtx, -UNITS_PER_WORD); >=20 > Pointer mode and Pmode can be distinct for x32 target. However, I have no > idea what goes into interrupt frame for x32. Let's ask HJ.=