From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2D0E4385B510; Tue, 11 Jun 2024 10:36:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D0E4385B510 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718102189; bh=4td80mxK/1ap8V+s9ASrcb+DbBcKIvmh/uPNjedc3xc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CtkuhCEgbShJAY/91+/4AlXCbWgwgjkPcm3A9PGxiewindlJDNNUM4Fb1dhK0Rk0o dTwHKYMWrQV+Sho4dO+9kty8mofbGpDoVVOtrf6H+x55xLo7yAf4CsiE0D18266CO/ oMtdF8Bx9qmyV/DjDeItkfygNl6VvAt/oriCXujE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113262] [11/12 Regression] ICE when using [[gnu::copy("")]] attribute Date: Tue, 11 Jun 2024 10:36:28 +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: 14.0 X-Bugzilla-Keywords: ice-on-invalid-code 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: 11.5 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=3D113262 --- Comment #8 from GCC Commits --- The releases/gcc-12 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ca8ad807cf33ca9d74a2aecdd78b59af9834b882 commit r12-10504-gca8ad807cf33ca9d74a2aecdd78b59af9834b882 Author: Jakub Jelinek Date: Tue Jan 9 15:37:04 2024 +0100 c-family: copy attribute diagnostic fixes [PR113262] The copy attributes is allowed on decls as well as types and even has checks whether decl (set to *node) is DECL_P or TYPE_P, but for diagnos= tics unconditionally uses DECL_SOURCE_LOCATION (decl), which obviously only works if it applies to a decl. 2024-01-09 Jakub Jelinek PR c/113262 * c-attribs.cc (handle_copy_attribute): Don't use DECL_SOURCE_LOCATION (decl) if decl is not DECL_P, use input_location instead. Formatting fixes. * gcc.dg/pr113262.c: New test. (cherry picked from commit c9fc7f398e8b330ff12ec8a29bfa058b6daf6624)=