get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218166/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218166,
    "url": "http://patchwork.ozlabs.org/api/patches/2218166/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/acvYkLBYwL86lR-V@arm.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<acvYkLBYwL86lR-V@arm.com>",
    "list_archive_url": null,
    "date": "2026-03-31T14:22:08",
    "name": "[2/4] c, middle-end: Add target hook to prevent inheriting type attributes [PR122483]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "d65f0ea8c21e42999ffac3847430032942d5be5a",
    "submitter": {
        "id": 79039,
        "url": "http://patchwork.ozlabs.org/api/people/79039/?format=api",
        "name": "Alex Coplan",
        "email": "Alex.Coplan@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/acvYkLBYwL86lR-V@arm.com/mbox/",
    "series": [
        {
            "id": 498209,
            "url": "http://patchwork.ozlabs.org/api/series/498209/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498209",
            "date": "2026-03-31T14:20:57",
            "name": "aarch64, c-family: Stronger type checking for target attrs [PR122483]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498209/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218166/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218166/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=E2+bD9Vh;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=E2+bD9Vh;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256\n header.s=selector1 header.b=E2+bD9Vh;\n\tdkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com\n header.a=rsa-sha256 header.s=selector1 header.b=E2+bD9Vh",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=arm.com",
            "sourceware.org; spf=pass smtp.mailfrom=arm.com",
            "server2.sourceware.org;\n arc=pass smtp.remote-ip=52.101.72.62"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flVkJ6wjlz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 01:24:40 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E38394B35884\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 14:24:38 +0000 (GMT)",
            "from AM0PR02CU008.outbound.protection.outlook.com\n (mail-westeuropeazon11013062.outbound.protection.outlook.com [52.101.72.62])\n by sourceware.org (Postfix) with ESMTPS id 67FCE4B7A1F1\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 14:23:20 +0000 (GMT)",
            "from AS4P189CA0034.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5dd::12)\n by DB9PR08MB8459.eurprd08.prod.outlook.com (2603:10a6:10:3d5::17)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.28; Tue, 31 Mar\n 2026 14:23:15 +0000",
            "from AMS0EPF000001B0.eurprd05.prod.outlook.com\n (2603:10a6:20b:5dd:cafe::4) by AS4P189CA0034.outlook.office365.com\n (2603:10a6:20b:5dd::12) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.28 via Frontend Transport; Tue,\n 31 Mar 2026 14:23:08 +0000",
            "from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by\n AMS0EPF000001B0.mail.protection.outlook.com (10.167.16.164) with Microsoft\n SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.21\n via Frontend Transport; Tue, 31 Mar 2026 14:23:15 +0000",
            "from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15)\n by DBBPR08MB6299.eurprd08.prod.outlook.com (2603:10a6:10:20d::16)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.28; Tue, 31 Mar\n 2026 14:22:11 +0000",
            "from PAWPR08MB8958.eurprd08.prod.outlook.com\n ([fe80::c522:a3f1:1566:2377]) by PAWPR08MB8958.eurprd08.prod.outlook.com\n ([fe80::c522:a3f1:1566:2377%4]) with mapi id 15.20.9745.027; Tue, 31 Mar 2026\n 14:22:11 +0000"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org E38394B35884",
            "OpenDKIM Filter v2.11.0 sourceware.org 67FCE4B7A1F1"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 67FCE4B7A1F1",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 67FCE4B7A1F1",
        "ARC-Seal": [
            "i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1774967000; cv=pass;\n b=hMHA309IIXfVWl3Jy2kp9imU3dPthaWngB/aOmH5hu2WACS+JAsejfEcPQiwB/w8jG0+ehXY2k4EIkHGezmrw9K9h1MAj/PCAst44FdSvlph8hByLMhcP8FNLkvrh79k9MSRerkC07K0rnHZgmLx5wnqfFJQsSVo817+vFhq5WU=",
            "i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;\n b=jY2vVCdvYv7Q5lmnmI7Y7cAVOpJCStRNKXArHPNJgct3O9TsKfnBaWwFX8PfdiUG7999FAIC8HvCaONol5/xqnz3311Uyz1DIxXF/pYPkSjvj+sufjTP+l41o3uhbo+RQZXxNOiLtNNPdiBIXdseuufYF9jaD/UuFI8gTVN88NH6kZqtBw0GRLYHLdOAJMOcn457NSweHD5w4ICfBp1QZLNqGOfvClx+S9ImvTtpWbNIIBo9Bqj84Do08FlkRlkwY6SVLpm7tKTYoRNeptjBY8MPEET9E8eZy9eB1btElDaVdkAiOkODZtQkn4AYhUCT/LeTDH35GguOpSuem3w3Vg==",
            "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=q9BZDDHA5Hkeav3CJtkdcOhN39kcCoJLLfWRhaxIRWU1NFAck0mysTlGZaNLQ5AWyfGoclmgBizk5FmlESNsJTOQJ1UGo8Dhei5rY3pAgEjj44Xai+siisDwytm1j0MFIOLTg0PButs8wkYS+6B47o5F8M/HsFjsWv3A0MI/lWLB4/nTxSaKWvdYxnj1kmR3WCAhzRWYWBiQMKRkblCsGHc4kH9Q6jgGdLeThegA9Rid+PmPQkXyCykcCwVinpOQkn3mdkQkrUQ2W4et7WV8M9elsf3ynkDii+8iHyjsyPjvhMwRojrbc/6sCy7CFzP35R5vUsaMvYm6oFQYqJFtUg=="
        ],
        "ARC-Message-Signature": [
            "i=3; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774967000; c=relaxed/simple;\n bh=tYU/ZX5ljr9VDZpxsJ6eFcBjFOoBRaZvf04H+/y+3RU=;\n h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID:\n MIME-Version;\n b=LD9swJYE420nIWVuTUH42lQfvkOHhTCFNBIYaBebDDJPQb+zjwaWjSyxdrN/daCGm9+Uw8IjQYEsqxO3sarsGXUXXOqnr5jOxEEu+wxCbU9Fy2o2HIImwtKhpubc5akwnaiFnrfJ19rZtX/92i0KcG8xlsKWK4lDcz7kQFuuFcE=",
            "i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=FLt0OA5AT+kMnF4XsSBkYsOI8Q9puWtVtoAut/6eB8I=;\n b=ymqbzFAH//4lmPRcmi4D5QAh9g49VIfiVJd3Eka8NSfas/RGuZcc7twFkqmJMKBGykhSXAuDXqoAbhHNJja8sZvMvucQicxLriWbm304/ky1s5Gk9r30yTv6BQEMSwoxVjfDiF8vjM5beSK+crnwZy1gTSGkrXGX33yiYhRq722IzT5YCbxyqEYfk8cW82G6CALqKdVbVglEcKSmCOj7w4/0fQKZQvUyF/FvqsKg8KbszMEnG9m2dktTg1JTv3PNk5PAzXqfVSVbZjcDfPARy08pp4MOCk9qXO0OTtR2woMGOMpzGMSyn28Phe8r/OsevZL8tNSZzf57QybY/GJcwA==",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=FLt0OA5AT+kMnF4XsSBkYsOI8Q9puWtVtoAut/6eB8I=;\n b=xxctOkKWI39M04DbFnjRlJXtmTP0g9/fLIohauOkfebpK3TybImxhJc39Qj1dHk7rARMOcw8iKDyGKPtbN+uca9MGZGJ6QX5eHA39IspK6VkdETsCihZyBF07Zjz+PTPvqrWrYCEcK0kbMNuzAwWStSfY6KnHtrHU+p6aF6i8/+gX4nS295N+S5ULAJHxGfK82f87HOOOBfkj4BRJiAdQL30VPFs2ZAvpQ89DW6wkpmXfgO5Uj8bzfa0v9G0OaMSDNN1WNpsKA9JAL9CstcbDXlvrtfCVV3PNh9Dzqi+S5B4TjXu0e76eaIxN+2Bwx2L1MyKegTpKXViLYs0+GqsHA=="
        ],
        "ARC-Authentication-Results": [
            "i=3; server2.sourceware.org",
            "i=2; mx.microsoft.com 1; spf=pass (sender ip is\n 4.158.2.129) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass\n (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass\n (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1\n spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com]\n dmarc=[1,1,header.from=arm.com])",
            "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass\n header.d=arm.com; arc=none"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=FLt0OA5AT+kMnF4XsSBkYsOI8Q9puWtVtoAut/6eB8I=;\n b=E2+bD9Vh7JSe4E6gA5rL7gtZfYtFUD0ETobLxZwUVB7UTnOhh2L2LjuvMjuJSFz/XXbFLewZCnj0OC5msPuN0MQ3b3p8uPtZQFhv4PG95+294O5NeRtIjFkR6quOB7AHs7dcPhCc94icdAmaV8NB0+c8TvfKi5/V8JE3VI8tnrM=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=FLt0OA5AT+kMnF4XsSBkYsOI8Q9puWtVtoAut/6eB8I=;\n b=E2+bD9Vh7JSe4E6gA5rL7gtZfYtFUD0ETobLxZwUVB7UTnOhh2L2LjuvMjuJSFz/XXbFLewZCnj0OC5msPuN0MQ3b3p8uPtZQFhv4PG95+294O5NeRtIjFkR6quOB7AHs7dcPhCc94icdAmaV8NB0+c8TvfKi5/V8JE3VI8tnrM="
        ],
        "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 4.158.2.129)\n smtp.mailfrom=arm.com; dkim=pass (signature was verified)\n header.d=arm.com;dmarc=pass action=none header.from=arm.com;",
        "Received-SPF": "Pass (protection.outlook.com: domain of arm.com designates\n 4.158.2.129 as permitted sender) receiver=protection.outlook.com;\n client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C",
        "Authentication-Results-Original": "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=arm.com;",
        "Date": "Tue, 31 Mar 2026 15:22:08 +0100",
        "From": "Alex Coplan <alex.coplan@arm.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Joseph Myers <josmyers@redhat.com>, Marek Polacek <polacek@redhat.com>,\n Richard Biener <rguenther@suse.de>,\n Alice Carlotti <alice.carlotti@arm.com>,\n Richard Sandiford <rdsandiford@googlemail.com>,\n Richard Earnshaw <richard.earnshaw@arm.com>,\n Tamar Christina <tamar.christina@arm.com>,\n Kyrylo Tkachov <ktkachov@nvidia.com>,\n Andrew Pinski <andrew.pinski@oss.qualcomm.com>,\n Wilco Dijkstra <wilco.dijkstra@arm.com>",
        "Subject": "[PATCH 2/4] c, middle-end: Add target hook to prevent inheriting\n type attributes [PR122483]",
        "Message-ID": "<acvYkLBYwL86lR-V@arm.com>",
        "Content-Type": "multipart/mixed; boundary=\"kjcL0pUfWFgd0TCD\"",
        "Content-Disposition": "inline",
        "Content-Transfer-Encoding": "8bit",
        "X-ClientProxiedBy": "PA7P264CA0172.FRAP264.PROD.OUTLOOK.COM\n (2603:10a6:102:36f::8) To PAWPR08MB8958.eurprd08.prod.outlook.com\n (2603:10a6:102:33e::15)",
        "MIME-Version": "1.0",
        "X-MS-TrafficTypeDiagnostic": "\n PAWPR08MB8958:EE_|DBBPR08MB6299:EE_|AMS0EPF000001B0:EE_|DB9PR08MB8459:EE_",
        "X-MS-Office365-Filtering-Correlation-Id": "32d1404a-f0b5-4eb0-a33d-08de8f310c29",
        "x-checkrecipientrouted": "true",
        "NoDisclaimer": "true",
        "X-MS-Exchange-SenderADCheck": "1",
        "X-MS-Exchange-AntiSpam-Relay": "0",
        "X-Microsoft-Antispam-Untrusted": "BCL:0;\n ARA:13230040|1800799024|6049299003|376014|366016|56012099003|18002099003|4053099003;",
        "X-Microsoft-Antispam-Message-Info-Original": "\n ffv+BI2Jl1sgzUlA6ZCJv3DMBIYEIYnDDuMuO27BBpre7GcW3IL7LRJr7isaYgShOe6fUZ6SKrIdxvjlHP1Sk2P6dyoH6j2uOfu19xzrYbtj4XQlVg9xbpBth6qAfp3y6A1AyaS4dr9omWThBGcNgXepjwspHqdSnA5nWiS3Y4dZgvsqu+zfC635UUeb9VXcNva5MqN3CXb2KtcUZAV51ywb6z18JBf9CoDZxsaPxXA0MC86QRlh/iRUeoXqR5YFEtXfZQ0K5x5MIdnUrLkb1JdjtQ2cvgZ1QMh6waSCpGHuvLJHW5b2KU+ZaYxxJyj+DvjcZUYG4fUAIVbXLxa5B7GR/sLdhDU4rsZDY5WpZEnlbInp525pVDWIoW5hGedGO656HOp0jiM0lQxP+8H6rKbwBR54JCi/Y7VHGPBRmTnRXIaqnlXMVXpbR5blQQaOKDdf0winHj5rPVtNufW83HVK/SPfT+0SgiI9tYLlVJJtDjltiAnhub8rWiZGQ057AzHQH0izGw9Fz8OUWOIV8FnrRHxdiYCEWiRA+Rf9W0d56tqRwc1BDgPCi0WMYUuzRsvE6k6r1C8Z4B5MalmVHc0IT/M4GDtebf2h7vDB6OdQvkTNwzYpuXrrPuMIx2alaxQiEHnMDaMyoF10G1mbrEB2+eIMEQ31rv/byGaeeiQazwLsSw385L4oH6nMZ/hVRarT2Dlvvh8zLGohUo6LlqqoE+z9VP7WSngWmRevkfw=",
        "X-Forefront-Antispam-Report-Untrusted": "CIP:255.255.255.255; CTRY:; LANG:en;\n SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com;\n PTR:; CAT:NONE;\n SFS:(13230040)(1800799024)(6049299003)(376014)(366016)(56012099003)(18002099003)(4053099003);\n DIR:OUT; SFP:1101;",
        "X-Exchange-RoutingPolicyChecked": "\n SZ0Vih6HFwCy4F2CfAKw4GgPAJ3raYZrW71FvYhrlOC4cQFQ3YSmwrywEaX4L4JhgLy/oOPD7sZqpf3+1bv+/drdb3E+Ld6m3HfIhDJfolB/nJ5HVkkfD0LqMJ+x4iudEQfKy9FTqjL9qTnB2XdzstKXsyYwcg7pN3mHpoq/6YTjnFsHATDC9s4Rhp2XbMiQLn5bAnwW4mIo9NMS3es1/XbtPa7TXIEnaWl1reNVabkAA1WfAdt8JmlP9+zEtjE627fWMy7bfo6FcyAKbZUrVnXduOnDZZn7LjV+s7XaU+9COQhxsmQoRl0F1SV0JugwM0y9AOGXohUcGTczi7IFVw==",
        "X-MS-Exchange-Transport-CrossTenantHeadersStamped": [
            "DBBPR08MB6299",
            "DB9PR08MB8459"
        ],
        "X-EOPAttributedMessage": "0",
        "X-MS-Exchange-Transport-CrossTenantHeadersStripped": "\n AMS0EPF000001B0.eurprd05.prod.outlook.com",
        "X-MS-PublicTrafficType": "Email",
        "X-MS-Office365-Filtering-Correlation-Id-Prvs": "\n b3943906-4ee4-439a-da30-08de8f30e5ef",
        "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|376014|35042699022|14060799003|36860700016|1800799024|82310400026|6049299003|4053099003|18002099003|56012099003;",
        "X-Microsoft-Antispam-Message-Info": "\n lH7Kd5fcFjWOXbVfwTNxahEqKAvCci2vSRvnsJUTDFS7M3zFfaHyogaDswaF8IZf2yTg2c9HC1DZ3HsrhFkxFAK5UsT7Kjh9NhOCSOLFqpiOzpK5lfH9zEIUD2c3uVLnM7/SGO0fL+7aA8YyZOzYURogbNW5sfyFI9vszzq+kG31Nd6jvXC8QL7DqUcWB3IXH6dIu71vcgdL4MW+C07SX8aP39GOPMyOpczvaKiWVWNkUb36n+DQi+kXzHEL0HxqCJF7NZIGMagl3vtxeo952TDdQCsIk/sEdAP74hTN3lLqklsWdZMMKbufXDNiut5MhIQO9hAhosxDO8jAb4Kn9/9s6hAufnN+jjafTF7iEz9a6VarbU4EGzt4VBIaTXPvSnOejKNeHdugO0fXkAV/nebSs86kKagOWaVWs+eeZWfhklxdPG24WrVRjO4+oO+VHWPW9yo0+n3tmWMUUtylM+u57CHQGujCpMwEMja1qF9Gif4Z0Tr1fmPlUPQ8K/auReYt4ZM9EHRIaxUotGb7U+h49PJ/vWo59lds+2JDh0DM0+/QTPYpzTMPTrNAk0J+BBde67LugMHFoXAooY+IuHd9fazyemxz71JxoiPfuCjT7ztATUlwjJ4yGEgJOZ/b2JbU/MDuKAsHu7RmeTBvYCMDacDV8AA6b8KyXLzV5PPBt83mXtlhQvFczpSEuzb5Uwhrmxrf+GHaC0o24Ca0Wjtjo4cpWaGSZC9ra4rGGZF0jQ+Jb5remOe7dDUHq+6ti3dGCBM5oK06+YC9NtLkZQ==",
        "X-Forefront-Antispam-Report": "CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com;\n PTR:InfoDomainNonexistent; CAT:NONE;\n SFS:(13230040)(376014)(35042699022)(14060799003)(36860700016)(1800799024)(82310400026)(6049299003)(4053099003)(18002099003)(56012099003);\n DIR:OUT; SFP:1101;",
        "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1",
        "X-MS-Exchange-AntiSpam-MessageData-0": "\n X+1TkQTLWc3o74UPJJ6JZouWJcriIHqDBHIgi5ZyEtQ7rC1Ta9IPRFhIqrkt35St6WAi+1cnxu0eKAiX0dDO95ue/exTFnYOkqVrsvusVhgrkjtg99QAtTXFQwV7s05usePaGZYL+oDV6UYIe/uaQp+L0c4k+1zEEB+3tvEbAywPyOzz2zV4iDk14UGGVlyAoj+cf1wXKxnG2TRY1f8rDbqK5B9rk98tAZVCKY/q2FistvyDnhgsYnwSlroY7yY+HFrTVCHD6nDiVuELWREqpGS21lV5jl2pfW9n2FsuGUp09q3k3LRzBnyTAV1B5PE6WPYN3SXAisN6EGN1eJ68zre2p8CPniPOT8e+xlR9IRWXIOQbDD46uRvhk9yZt+KZlUw+zA0F5Mq1d7bq6lFloleOIk68mpAebfcKHAb/yU0agtQ7Ka/wu1n/NpIDG/0K",
        "X-OriginatorOrg": "arm.com",
        "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "31 Mar 2026 14:23:15.2379 (UTC)",
        "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 32d1404a-f0b5-4eb0-a33d-08de8f310c29",
        "X-MS-Exchange-CrossTenant-Id": "f34e5979-57d9-4aaa-ad4d-b122a662184d",
        "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129];\n Helo=[outbound-uk1.az.dlp.m.darktrace.com]",
        "X-MS-Exchange-CrossTenant-AuthSource": "\n AMS0EPF000001B0.eurprd05.prod.outlook.com",
        "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous",
        "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "This adds TARGET_STRONG_AFFECTS_TYPE_IDENTITY_P and uses it in the C\nfrontend.  If the target returns true from this hook, this patch\nprevents merging subsequent function decls D1, D2 with the same name and\nsignature, D1 having TYPE_ATTRIBUTES and D2 having none, with at least\none of the attriutes being target-specific and having\naffects_type_identity set.\n\nThe motivation is to restore the rejection of code such as:\n\n  void f(void) [[arm::streaming]];\n  void f(void);\n\non aarch64.  The next patch in the series implements the new hook on\naarch64 and returns true, thereby fixing this P1 regression.\n\nThe following alternative approaches were considered, but I decided\nagainst pursuing them:\n\n1. Have the hook instead take a specific attribute, allowing more\n   fine-grained control over which attributes require the strong\n   agreement.  While this is more flexible, I don't think it's needed\n   for what we want on aarch64, and would be somewhat inefficient, in that\n   both the caller and the callee would end up having to look up the\n   attribute_spec, just to query the same flag (affects_type_identity).\n2. Extend TARGET_COMP_TYPE_ATTRIBUTES with a new return value (-1) to\n   indicate that the attributes are \"strongly incompatible\" (suggested\n   by Richard S in the PR).  I looked into this, but it looks like it\n   will be a bit too invasive to the front-end code, especially for\n   stage 4.  The approach taken by this patch is more targeted and\n   allows for incremental adoption across the front-ends.\n\nTo avoid having the new hook change the semantics of generic attributes,\nthe patch adds a mechanism for middle-end / front-end code to detect if\nan attribute is target-specific, i.e. if it was defined via\nTARGET_ATTRIBUTE_TABLE.\n\nBootstrapped/regtested as a series on aarch64-linux-gnu and\nx86_64-linux-gnu (with and without the final C++ patch), OK for trunk?\n\nThanks,\nAlex\n\ngcc/ChangeLog:\n\n\tPR target/122483\n\t* attribs.cc (enum attr_table_kind): New. Use it ...\n\t(init_attributes): ... here.\n\t(target_attribute_p): New.\n\t* attribs.h (scoped_attribute_specs::contains): New.\n\t(target_attribute_p): Declare.\n\t* doc/tm.texi: Regenerate.\n\t* doc/tm.texi.in: Add entry for\n\tTARGET_STRONG_AFFECTS_TYPE_IDENTITY_P.\n\t* target.def (strong_affects_type_identity_p): New.\n\ngcc/c-family/ChangeLog:\n\n\tPR target/122483\n\t* c-attribs.cc (decl_can_inherit_type_attributes_p): New.\n\t* c-common.h (decl_can_inherit_type_attributes_p): Declare.\n\ngcc/c/ChangeLog:\n\n\tPR target/122483\n\t* c-decl.cc (diagnose_mismatched_decls): Use new helper\n\tdecl_can_inherit_type_attributes_p to decide when to allow\n\ta subsequent (otherwise) duplicate decl to inherit\n\tTYPE_ATTRIBUTES.\n---\n gcc/attribs.cc            | 20 ++++++++++++++++++--\n gcc/attribs.h             | 10 ++++++++++\n gcc/c-family/c-attribs.cc | 20 ++++++++++++++++++++\n gcc/c-family/c-common.h   |  1 +\n gcc/c/c-decl.cc           |  4 +++-\n gcc/doc/tm.texi           | 12 ++++++++++++\n gcc/doc/tm.texi.in        |  2 ++\n gcc/target.def            | 16 ++++++++++++++++\n 8 files changed, 82 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/gcc/attribs.cc b/gcc/attribs.cc\nindex 99f2fd75531..9c8f1a81ce7 100644\n--- a/gcc/attribs.cc\n+++ b/gcc/attribs.cc\n@@ -45,6 +45,11 @@ along with GCC; see the file COPYING3.  If not see\n    searched.  */\n static array_slice<const scoped_attribute_specs *const> attribute_tables[2];\n \n+enum attr_table_kind {\n+  ATTR_TABLE_LANG,\n+  ATTR_TABLE_TARGET\n+};\n+\n /* Substring representation.  */\n \n struct substring\n@@ -322,8 +327,8 @@ init_attributes (void)\n   if (attributes_initialized)\n     return;\n \n-  attribute_tables[0] = lang_hooks.attribute_table;\n-  attribute_tables[1] = targetm.attribute_table;\n+  attribute_tables[ATTR_TABLE_LANG] = lang_hooks.attribute_table;\n+  attribute_tables[ATTR_TABLE_TARGET] = targetm.attribute_table;\n \n   if (flag_checking)\n     check_attribute_tables ();\n@@ -595,6 +600,17 @@ any_nonignored_attribute_p (tree attrs)\n   return false;\n }\n \n+/* Return true iff AS is a target-specific attribute.  */\n+bool\n+target_attribute_p (const attribute_spec *as)\n+{\n+  for (auto scoped_table : attribute_tables[ATTR_TABLE_TARGET])\n+    if (scoped_table->contains (as))\n+      return true;\n+\n+  return false;\n+}\n+\n /* See whether LIST contains at least one instance of attribute ATTR\n    (possibly with different arguments).  Return the first such attribute\n    if so, otherwise return null.  */\ndiff --git a/gcc/attribs.h b/gcc/attribs.h\nindex 9f9abc5e4c3..84ce08a3da8 100644\n--- a/gcc/attribs.h\n+++ b/gcc/attribs.h\n@@ -25,6 +25,15 @@ struct scoped_attribute_specs\n {\n   const char *ns;\n   array_slice<const attribute_spec> attributes;\n+\n+  /* Test if AS is a member of this set.  */\n+  bool contains (const attribute_spec *as) const\n+    {\n+      auto start = (uintptr_t) attributes.begin ();\n+      auto end = (uintptr_t) attributes.end ();\n+      auto cand = (uintptr_t) as;\n+      return start <= cand && cand < end;\n+    }\n };\n \n extern const struct attribute_spec *lookup_attribute_spec (const_tree);\n@@ -49,6 +58,7 @@ extern tree make_attribute (string_slice, string_slice, tree);\n extern bool attribute_ignored_p (tree);\n extern bool attribute_ignored_p (const attribute_spec *const);\n extern bool any_nonignored_attribute_p (tree);\n+extern bool target_attribute_p (const attribute_spec *);\n \n extern struct scoped_attributes *\n   register_scoped_attributes (const scoped_attribute_specs &, bool = false);\ndiff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc\nindex d437c55285e..a42a6fe1fed 100644\n--- a/gcc/c-family/c-attribs.cc\n+++ b/gcc/c-family/c-attribs.cc\n@@ -734,6 +734,26 @@ attribute_takes_identifier_p (const_tree attr_id)\n     return targetm.attribute_takes_identifier_p (attr_id);\n }\n \n+/* Called when resolving duplicate function decls D1,D2.  ATTR is the\n+   TYPE_ATTRIBUTES of D1.  D2 has none.\n+\n+   Return true iff we should allow merging of the decls, with D2\n+   inheriting the TYPE_ATTRIBUTES from D1.  */\n+\n+bool\n+decl_can_inherit_type_attributes_p (const_tree attr)\n+{\n+  if (!targetm.strong_affects_type_identity_p ())\n+    return true;\n+\n+  for (; attr; attr = TREE_CHAIN (attr))\n+    if (auto as = lookup_attribute_spec (TREE_PURPOSE (attr)))\n+      if (as->affects_type_identity && target_attribute_p (as))\n+\treturn false;\n+\n+  return true;\n+}\n+\n /* Set a musttail attribute MUSTTAIL_P on return expression RETVAL\n    at LOC.  */\n \ndiff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h\nindex 89517e2a80c..06f46f180d1 100644\n--- a/gcc/c-family/c-common.h\n+++ b/gcc/c-family/c-common.h\n@@ -1685,6 +1685,7 @@ extern void check_for_xor_used_as_pow (location_t lhs_loc, tree lhs_val,\n \n /* In c-attribs.cc.  */\n extern bool attribute_takes_identifier_p (const_tree);\n+extern bool decl_can_inherit_type_attributes_p (const_tree);\n extern tree handle_deprecated_attribute (tree *, tree, tree, int, bool *);\n extern tree handle_unused_attribute (tree *, tree, tree, int, bool *);\n extern tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *);\ndiff --git a/gcc/c/c-decl.cc b/gcc/c/c-decl.cc\nindex 8a894de3a1b..750f423c0b1 100644\n--- a/gcc/c/c-decl.cc\n+++ b/gcc/c/c-decl.cc\n@@ -2344,7 +2344,9 @@ diagnose_mismatched_decls (tree newdecl, tree olddecl,\n \t      if (TREE_CODE (olddecl) == FUNCTION_DECL)\n \t\t{\n \t\t  tree attrs = TYPE_ATTRIBUTES (TREE_TYPE (olddecl));\n-\t\t  if (attrs && !TYPE_ATTRIBUTES (TREE_TYPE (newdecl)))\n+\t\t  if (attrs\n+\t\t      && !TYPE_ATTRIBUTES (TREE_TYPE (newdecl))\n+\t\t      && decl_can_inherit_type_attributes_p (attrs))\n \t\t    {\n \t\t      /* Similar to the C++ front-end, for FUNCTION_DECL,\n \t\t\t if OLDDECL has attributes and NEWDECL doesn't,\ndiff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi\nindex 394a46fdbaa..ee488fb86d3 100644\n--- a/gcc/doc/tm.texi\n+++ b/gcc/doc/tm.texi\n@@ -10897,6 +10897,18 @@ to perform initial processing of the @samp{dllimport} and\n @file{i386/i386.cc}, for example.\n @end deftypefn\n \n+@deftypefn {Target Hook} bool TARGET_STRONG_AFFECTS_TYPE_IDENTITY_P ()\n+Return true from this hook to indicate that the target wants a\n+ stronger notion of the @code{affects_type_identity} flag on target-specific\n+ type attributes.  In particular, suppose two function decls of the same name\n+ and signature occur, the first decl has some @code{TYPE_ATTRIBUTES},\n+ and the second has none.  By default, the front-ends will merge the\n+ decls by allowing the second one to inherit the attributes from the\n+ first.  The target can return true from this hook to prevent this\n+ merging if there is any target-specific attribute in the\n+ @code{TYPE_ATTRIBUTES} that has @code{affects_type_identity} set.\n+@end deftypefn\n+\n @deftypefn {Target Hook} bool TARGET_VALID_DLLIMPORT_ATTRIBUTE_P (const_tree @var{decl})\n @var{decl} is a variable or function with @code{__attribute__((dllimport))}\n specified.  Use this hook if the target needs to add extra validation\ndiff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in\nindex 274bb899d0c..71a479473cd 100644\n--- a/gcc/doc/tm.texi.in\n+++ b/gcc/doc/tm.texi.in\n@@ -7128,6 +7128,8 @@ be documented in @file{extend.texi}.\n \n @hook TARGET_MERGE_DECL_ATTRIBUTES\n \n+@hook TARGET_STRONG_AFFECTS_TYPE_IDENTITY_P\n+\n @hook TARGET_VALID_DLLIMPORT_ATTRIBUTE_P\n \n @defmac TARGET_DECLSPEC\ndiff --git a/gcc/target.def b/gcc/target.def\nindex 206c94f8749..63322ff3766 100644\n--- a/gcc/target.def\n+++ b/gcc/target.def\n@@ -2252,6 +2252,22 @@ to perform initial processing of the @samp{dllimport} and\\n\\\n  tree, (tree olddecl, tree newdecl),\n  merge_decl_attributes)\n \n+/* Test if the target wants a stronger notion of affects_type_identity\n+   for target-specific attributes.  */\n+DEFHOOK\n+(strong_affects_type_identity_p,\n+ \"Return true from this hook to indicate that the target wants a\\n\\\n+ stronger notion of the @code{affects_type_identity} flag on target-specific\\n\\\n+ type attributes.  In particular, suppose two function decls of the same name\\n\\\n+ and signature occur, the first decl has some @code{TYPE_ATTRIBUTES},\\n\\\n+ and the second has none.  By default, the front-ends will merge the\\n\\\n+ decls by allowing the second one to inherit the attributes from the\\n\\\n+ first.  The target can return true from this hook to prevent this\\n\\\n+ merging if there is any target-specific attribute in the\\n\\\n+ @code{TYPE_ATTRIBUTES} that has @code{affects_type_identity} set.\",\n+ bool, (),\n+ hook_bool_void_false)\n+\n /* Given two types, merge their attributes and return the result.  */\n DEFHOOK\n (merge_type_attributes,\n",
    "prefixes": [
        "2/4"
    ]
}