From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0B7463858D1E; Mon, 3 Oct 2022 19:36:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0B7463858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664825772; bh=1O5Dot/vhyCu4o1ch55G5qm2b3poZHKfaLMdp+9KT4s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=iLNcx1U6y2iUoPM4N9bXN+bEvAeeJZ3XUuSM76KLlveldiTlsDnG/FflOqoEun53L Lpdmb1HBqGZUEVnfGPYj8io8+R/MSQ7O/yJY/XrB09LVlTRIcudgclCZR8sDazMTw8 4UFQP6CUsGN3hLi+OfhZrU3Xa/6kjhAdoOGTCWSY= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107000] ICE in gfc_real2complex, at fortran/arith.cc:2243 Date: Mon, 03 Oct 2022 19:36:11 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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: attachments.isobsolete attachments.created 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=3D107000 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #53651|0 |1 is obsolete| | --- Comment #20 from anlauf at gcc dot gnu.org --- Created attachment 53659 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53659&action=3Dedit Next try. (In reply to Mikael Morin from comment #18) > Well, a new return code seems better (ARITH_INVALID_TYPE ?). > I think it's better to move the check to the various gfc_arith_times, > gfc_arith_plus, gfc_arith_concat etc, because only those functions know w= hat > type is appropriate and what is not. > Admittedly BT_UNKNOWN is probably never appropriate, and the check could = be > done in reduce_binary_ac, but then it should be in reduce_binary_ca, > reduce_binary_aa and reduce_unary as well. > Then what's missing is a goto runtime in eval_intrinsic if evaluation > returns ARITH_INVALID_TYPE. > That's the first solution. Here's a patch that introduces ARITH_INVALID_TYPE and handles errors in reduce_unary, reduce_binary_ac, reduce_binary_ca, and reduce_binary_aa.=