From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A26B43858299; Tue, 12 Dec 2023 10:03:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A26B43858299 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702375416; bh=ye5niLl/cQT0cA6C6Qeen7FzHCYsiZ86L7ZrACJWsWw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hFg5KQOYETyzVYck17O+r469d4boX5cYaqU9864QPM88r7XEWUkIVpUn/C5Lfpyl2 tA77c2kft/ePngxeXSFrgElWjpax+UmGz36gR1SX/iIELhC1GNd2AIXeX4zz5Jv3fc hiO64LFmWu6K+1u1kp1GEb8wxeQlq/cLEkBpWyow= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112962] [14 Regression] ICE: SIGSEGV in operator() (recog.h:431) with -fexceptions -mssse3 and __builtin_ia32_pabsd128() Date: Tue, 12 Dec 2023 10:03:36 +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: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ubizjak at gmail dot com X-Bugzilla-Target-Milestone: 14.0 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=3D112962 --- Comment #7 from Jakub Jelinek --- On the other side, maybe we want some of the diagnostics that is only done = at expansion time (argument xyz must be such and such immediate). Though, at = -O2 it isn't diagnosed anyway because it is DCEd. Anyway, with just -O0 -mssse3 this works fine because of expr.cc: 11097 /* If we are going to ignore this result, we need only do somethi= ng 11098 if there is a side-effect somewhere in the expression. If the= re 11099 is, short-circuit the most common cases here. Note that we mu= st 11100 not call expand_expr with anything but const0_rtx in case this 11101 is an initial expansion of a size that contains a PLACEHOLDER_EXPR. */ 11102=20=20=20 11103 if (ignore) 11104 { 11105 if (! TREE_SIDE_EFFECTS (exp)) 11106 return const0_rtx; but with -fexceptions (and probably because we incorrectly don't mark the builtins nothrow?) this doesn't happen. I was thinking about something like --- gcc/i386-expand.cc.jj 2023-12-07 08:31:59.855850982 +0100 +++ gcc/i386-expand.cc 2023-12-12 11:02:54.524733315 +0100 @@ -11842,6 +11842,12 @@ ix86_expand_args_builtin (const struct b xops[i] =3D op; } + if (icode =3D=3D CODE_FOR_nothing) + { + gcc_assert (target =3D=3D const0_rtx); + return const0_rtx; + } + switch (nargs) { case 1: but of course, your choice...=