From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CEDDE3858CDB; Tue, 9 Jan 2024 14:37:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CEDDE3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1704811066; bh=ZFdPUpvNRi6j9tecb5YpEFH1Zfakkl1x454bmBZPzGU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Cho363bASJtYneQidbPvDof2Hk8GcV52tazgqaVodN4tBCb7gPf5s6bFPcvX2OR3f vCgMm19sjjHak3SYuTCYfJSPEnVbhKthEENj/TwXa4vQVqzLoHPpf/j1apdR6YlZRI K5fM71dojtuhxZYYaJxnDlam4VwEo6TgeJwio8G4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/113262] [11/12/13/14 Regression] ICE when using [[gnu::copy("")]] attribute Date: Tue, 09 Jan 2024 14:37:46 +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 #4 from GCC Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c9fc7f398e8b330ff12ec8a29bfa058b6daf6624 commit r14-7066-gc9fc7f398e8b330ff12ec8a29bfa058b6daf6624 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.=