From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74D043972029; Wed, 16 Sep 2020 19:22:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74D043972029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1600284179; bh=6/8vZON/IAqRW4j49pi+OugaewAwVrzMs8orMs1NE4g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=At6ZaI4JLWR/zPxDM/oHqGHuhhCBbI0IsyUTqbPnSz3lg2Iy3bBhFWlaLk5wss8Ls nujuXhiJvhGXZNPQNlOkcTCNgZWHGv3na6ZYA4wgDVGWzl0igsgGR0BIGv/Z5w0dRa T7UwVN+VmIQc9nnDk2LS2bf9tBCnkWbicwWuwEEY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96545] ICE in get_atomic_generic_size Date: Wed, 16 Sep 2020 19:22:59 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jakub 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: Wed, 16 Sep 2020 19:22:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96545 --- Comment #6 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:67627293b4fe2b230c6c32484752adb49f713315 commit r9-8908-g67627293b4fe2b230c6c32484752adb49f713315 Author: Jakub Jelinek Date: Tue Aug 11 16:46:49 2020 +0200 c-family: Fix ICE in get_atomic_generic_size [PR96545] As the testcase shows, we would ICE if the type of the first argument of various atomic builtins was pointer to (non-void) incomplete type, we w= ould assume that TYPE_SIZE_UNIT must be non-NULL. This patch diagnoses it instead. And also changes the TREE_CODE !=3D INTEGER_CST check to !tree_fits_uhwi_p, as we use tree_to_uhwi after this and at least in th= eory the int could be too large and not fit. 2020-08-11 Jakub Jelinek PR c/96545 * c-common.c (get_atomic_generic_size): Require that first argument's type points to a complete type and use tree_fits_uhwi_p instead= of just INTEGER_CST TREE_CODE check for the TYPE_SIZE_UNIT. * c-c++-common/pr96545.c: New test. (cherry picked from commit 7840b4dc05539cf5575b3e9ff57ff5f6c3da2cae)=