From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2078.outbound.protection.outlook.com [40.107.8.78]) by sourceware.org (Postfix) with ESMTPS id 2270B3858D28 for ; Fri, 17 Nov 2023 02:54:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2270B3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2270B3858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.78 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189677; cv=pass; b=V+IfQLemYnCJb/97+kxrtqxcecfqd7bL0l10V1lBQEg6ybF0HnUTXJs0fNv6FS5xVndFVaU/HsSHcjoFfbnx8b+I1Juh85XPJQ8/io7ZcYGAGD0LNkpWoPa1EWwiTXr8M1s7zqOGEQLgCIENYfK6cqnygd/f+ljOEh3fiPWu/O4= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1700189677; c=relaxed/simple; bh=R/yIovM78oGUISCpxJaUAEroKmLeGGlFifoHeOqrI9c=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=OMRI+AYstedQQkGZ/j1GLXANETVzd6mJElxxsqdD7x3RF4t9+CkaPrasgFpI+eRpmOL79x9VU7Fzd/1ba1WyvmyYgXix8cvkouaM0CtUdPGx1Ex6VgS9kMg4Mo5JWPaNJoCyCbfcQbWm225Oe/o31TFcyKxyr249fYwcXZlpTl8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=JG5dG8nukXCVASVjNIqHYTV5WCO0SH6uPizsJHHCbfiZi57zFTXQ1SKevgEbCYQXL/AnCMF0co/tyhEwOMOQAeL5cPp2ke67+Vn3laAnvizM8a2l0HeZeVfd/JCpw0Buht+atloLabfFUeki3kG6ySNH68r8JMM29Sj/IWVq4Vg609iwqLJYuMXHp3bj6DtzKbXDy0agVLoIXPN+zKp9M8DEfEKNlHb92MitwkQc15vQ71O4zrQ60QgV+TAVJDd0/l8iIdOSFlEmfcBO0o53fRn2g7zwVNf64MrZ3CkcUe/r3FN6CQyVgaRc4V2hFI2HsmPJa93q1B9LvSQgQQePHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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; bh=u5+mgrXayMqpj6hWtanl6hFOmOo0TqljCyJE463THBw=; b=E4o6A1r7OnuJ9+cLeYDYVBIHU4b7y5bpvhyTnA6ITs7OKclVv6L4sCNUTdrgNOvyZulk2ueX3lG+w9jWw4Bg8fjWeHu/eJkcHjGXoPn4hi8ZFu5xXJ7bkO2MNUKYpsrOwaYnL0gnNXNjtdFxPn4LZCmp1pwB576OCj2IajsUltldGd+/nWEzwUyhRWs4sw0Zl4spQjsSRK5B8QsanRn+rASN6+G8SmdEAtwsPBBfWpql4JyorfeGoWFtOdDmBdhpmQNO/5QuotOBZXbSueOsDMa4jQ7TXDzk7eruBElhEqSwQYD9cSHYxxUvBIqWf1qyG/Qx4nIYijN79KlLUwOIFA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u5+mgrXayMqpj6hWtanl6hFOmOo0TqljCyJE463THBw=; b=M3tMk+3QYKxiFO950rh8VwPzG9/h1KTFjEqZYos2CBnI2u+4okfhYQnLh1tnhGaLV3seShFCW63LU+r3iNUKtyKN8bleSy47jC/kKqiA8sC+Y6Un9u+ULBkJXHraD1u8jEBvPaVQDZos5GDDA79L8wI70ZATqmWl8qxEkGzK3W8= Received: from DUZP191CA0029.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4f8::17) by AM9PR08MB6260.eurprd08.prod.outlook.com (2603:10a6:20b:283::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.23; Fri, 17 Nov 2023 02:54:28 +0000 Received: from DB5PEPF00014B9A.eurprd02.prod.outlook.com (2603:10a6:10:4f8:cafe::ec) by DUZP191CA0029.outlook.office365.com (2603:10a6:10:4f8::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21 via Frontend Transport; Fri, 17 Nov 2023 02:54:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5PEPF00014B9A.mail.protection.outlook.com (10.167.8.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.20 via Frontend Transport; Fri, 17 Nov 2023 02:54:28 +0000 Received: ("Tessian outbound 8289ea11ec17:v228"); Fri, 17 Nov 2023 02:54:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f26c036a6ebf4300 X-CR-MTA-TID: 64aa7808 Received: from d0235a4f1486.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0CCA9135-7D28-4EA4-91AF-6B5FA8C04606.1; Fri, 17 Nov 2023 02:54:21 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d0235a4f1486.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 17 Nov 2023 02:54:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n5Uq2PJdk5twpxzHdytIlTYuujZxFo6mY9mPUOOFuKzvoITpBer/8iE/J03IFV3d2m08QoiQQh2rz7SUiK8uj9RRCfHt/fj6RHpr1SH6mQ7r0IvDNiWe+BcUkstVBs+n6P0Im15n6ARisisLmC+uARZZqiZVRSTrXIqNc7e8KumU2g4cq7UMtVM8GCyJ14LtiQwgalN7kvotxnxhkMZw71mK0q+bWUTS0MtBBp2x503Sa5yaYgeTuTyXi7Ew8c05379MK9IryIQI5LEBpUNkK1wYlvQuLALvlCnclrI5QHNi/ge7rATXr+O6L2z5EPzaBBLc/qUNShQFmKqRyWEjOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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; bh=u5+mgrXayMqpj6hWtanl6hFOmOo0TqljCyJE463THBw=; b=UyS2nd/COcYgDP0Ay0i1p94qM4V2Pog2xh42ZCcbRunqo8ikuTjbnITVyDTOOdicQSCbLcMcADDJTkQWV5PbDA7zykvJ0Xm8J9FXVv8KZVXzxV6NkLBZ8gIo2OKbvcJc9H023+cmFCDnAq0CMwPmrwDuOqJdfYvqUEVkkXHVS7P5tFJmfKgGwCq6Zfp45PzrGl+81GZmUQ6jJmfwlJEidGb/3O9IvgOT4jdsjF7dAbT9WutkxVDJjKXQ7lNurnR8ssf6e0A+gfUaiAPqULKCtLsC7PnLoR/62D9sFgrJhMVMyG43P7jzV3olB/3F1qKudOahdzHV3LnbjXBI5KTUgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u5+mgrXayMqpj6hWtanl6hFOmOo0TqljCyJE463THBw=; b=M3tMk+3QYKxiFO950rh8VwPzG9/h1KTFjEqZYos2CBnI2u+4okfhYQnLh1tnhGaLV3seShFCW63LU+r3iNUKtyKN8bleSy47jC/kKqiA8sC+Y6Un9u+ULBkJXHraD1u8jEBvPaVQDZos5GDDA79L8wI70ZATqmWl8qxEkGzK3W8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) by AS8PR08MB9409.eurprd08.prod.outlook.com (2603:10a6:20b:5a8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.21; Fri, 17 Nov 2023 02:54:20 +0000 Received: from AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2]) by AS8PR08MB6678.eurprd08.prod.outlook.com ([fe80::af15:c9d7:cd8c:6da2%7]) with mapi id 15.20.7002.022; Fri, 17 Nov 2023 02:54:19 +0000 Date: Fri, 17 Nov 2023 02:54:17 +0000 From: Andrew Carlotti To: gcc-patches@gcc.gnu.org Cc: ebotcazou@libertysurf.fr, poulhies@adacore.com, rguenther@suse.de, richard.sandiford@arm.com, richard.earnshaw@arm.com Subject: [PATCH v2 3/5] ada: Improve attribute exclusion handling Message-ID: <10532e77-2eb3-5043-0b71-faf415c5a1af@e124511.cambridge.arm.com> References: <88dc78af-82a3-9a9f-4b8e-461c41d296cc@e124511.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <88dc78af-82a3-9a9f-4b8e-461c41d296cc@e124511.cambridge.arm.com> X-ClientProxiedBy: LO2P265CA0490.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:13a::15) To AS8PR08MB6678.eurprd08.prod.outlook.com (2603:10a6:20b:398::8) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6678:EE_|AS8PR08MB9409:EE_|DB5PEPF00014B9A:EE_|AM9PR08MB6260:EE_ X-MS-Office365-Filtering-Correlation-Id: 46454385-c902-4682-fec0-08dbe71883e4 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: S4l96+ucG3Nh3dlgg0OlInDBGyLhCehx2V0KYtKP9qx3yS9ClQzhyR0N1mfVUGN9VxRcWIxsoODS6rro6A4eFTZwSFhCoOuKwiwhW1CetfLyTx2NKRfW8TS1+nueR2vlLauBBIEKqyYKJNSmIzVlPIkbkkECfufg4RhAqZ2gXaX5BAaY2bszPiNr68DfAQsm9vZmFF884nE77/zLIyzvBh1jANCV4Hcc5Su32GadyKMXTvvLyQEPHCsuc3QW7iZmY+GcQZZ8IlMxNrCrnixGtznBbCDavzU4BEXp/iknnmhKITv8LTHOhzYx17Xbr/zRQ+tJZlyu/4G9PyE8rKRVYVfAgRfchRRxKFMNDk2JfVTMdF+5KwYFH37MkjM5/2pbl/nKAJvOu4JLHsXkSJ+KkT2ETblw9hdjoR3z6puTDveA4Hm/9s+B1Hq4zSUvBj1v9nnUGkUsDEU3FNWX4EtsDeC04hFMaegBxJlZj7v2FEJmzerIX459p0AKEopaWZ93HqqqIMrT7xJxyJj3736qVBQ8zFZlfyHVV1b2YvW5GVIojpXFhqVFBJQDKfIvvKl57xeRpurrfxKg0CT+lprPyacW1duXBkrD/7+nvwqrRyLY9dghYFQBWiCnmjakVj672fbCx522ZR3mPivNtumcBFHAYddhmIoqbJHOvUmIvoA= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6678.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(366004)(39860400002)(376002)(396003)(136003)(230273577357003)(230922051799003)(230173577357003)(1800799009)(186009)(64100799003)(451199024)(2906002)(31686004)(38100700002)(31696002)(86362001)(5660300002)(44832011)(4326008)(41300700001)(8936002)(8676002)(83380400001)(6916009)(6512007)(316002)(26005)(66556008)(66946007)(66476007)(478600001)(6506007)(6486002)(41080700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9409 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B9A.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 31785fe1-9082-45e8-e689-08dbe7187ef5 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hDjSJX+jLFyuV4aESj1xlHwMHVLBiBbckoLp4NswvNEAs+VcRSKU76mjTh2fxHie1/v9FXrWsgFnSLQ+5WdDPscXLab7ER/RKJFKa4ca5XXpYA801vSWFixTwLyjaw/qJTdhSwhucSupufLc+Pc+1ZibwZL83b5GtKYuZWIkm+2WOdJ0MZPVsnrJ+3Z9SsD8DQs9KMNtSpyWvP7zJTxG/6T3CzhecpULv6NBGLXvZPRq39UR1s/Ylqx6WYjtv3j/5Q6QrNav9sxUSnupmoTzR0BClAsczju0f8SuFy+bu0y6TsRCMl4rJiAsY56/Lc6zNwopJdoxFLTElQwnryyEVOQMwC6xs1wBlUbS+W94sPTVTCg2X2hdcid+Geck6nxUZ5g6mj+Xyn0Ytujll7QWdGj52QpBHYbhqB2/VGgZmMWHm4HjfgzmBL8GTBkp5eb+ybcrzu775sQUtdDKtouS3+ZJRcHvAFOeh5WEYSdLvBqCGMuUjG7dZJwOWzLEefJBC+bgdpXC8oecwL7aYCqCWogjVcZYgUmc1a6C62sSRQd+MagUkhAS1Lps2Vv1CT8w7QTiCtu9y1fYMy34oZItmIL5L/j5bsoc8gjfpOEjveZs4sdj+v0iaz8NdrFPtOoCPwqzMuExfqxkKlU+nag2CYUszgJMD5ZgArR5IZ7afnoT5C7pjYsGbpPyLfcIt2q+UsgmUJfnVoCyMpHnIcNAyhObCHbpmW6X7Q2/yAmCSUusDwQC5hdmMH2syoCjiETLOn7BdZXx6eKDIeB2G4YIms6A/Pt3oVm34vAy8JcTPTE= X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230031)(4636009)(136003)(396003)(376002)(39860400002)(346002)(230273577357003)(230173577357003)(230922051799003)(82310400011)(186009)(1800799009)(64100799003)(451199024)(36840700001)(46966006)(40470700004)(31686004)(44832011)(41300700001)(8676002)(8936002)(4326008)(40480700001)(2906002)(5660300002)(316002)(6916009)(70586007)(70206006)(40460700003)(47076005)(86362001)(6486002)(478600001)(26005)(6512007)(6506007)(336012)(356005)(31696002)(81166007)(83380400001)(36860700001)(82740400003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2023 02:54:28.0954 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 46454385-c902-4682-fec0-08dbe71883e4 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B9A.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6260 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Change the handling of some attribute mutual exclusions to use the generic attribute exclusion lists, and fix some asymmetric exclusions by adding the exclusions for always_inline after noinline or target_clones. Aside from the new always_inline exclusions, the only change is functionality is the choice of warning message displayed. All warnings about attribute mutual exclusions now use the same message. --- I haven't manged to test the Ada frontend, but this patch (and the following one) contain only minimal change to functionality, which I have tested by copying the code to the C++ frontend and verifying the behaviour of equivalent changes there. Is this ok to push without further testing? If not, then could someone test this series for me? gcc/ada/ChangeLog: * gcc-interface/utils.cc (attr_noinline_exclusions): New. (attr_always_inline_exclusions): Ditto. (attr_target_exclusions): Ditto. (attr_target_clones_exclusions): Ditto. (gnat_internal_attribute_table): Add new exclusion lists. (handle_noinline_attribute): Remove custom exclusion handling. (handle_target_attribute): Ditto. (handle_target_clones_attribute): Ditto. diff --git a/gcc/ada/gcc-interface/utils.cc b/gcc/ada/gcc-interface/utils.cc index 8b2c7f99ef3060603658e438b71a3bfa3ef7f2ac..e33a63948cebdeafc3abcdd539a35141969ad978 100644 --- a/gcc/ada/gcc-interface/utils.cc +++ b/gcc/ada/gcc-interface/utils.cc @@ -130,6 +130,32 @@ static const struct attribute_spec::exclusions attr_stack_protect_exclusions[] = { NULL, false, false, false }, }; +static const struct attribute_spec::exclusions attr_always_inline_exclusions[] = +{ + { "noinline", true, true, true }, + { "target_clones", true, true, true }, + { NULL, false, false, false }, +}; + +static const struct attribute_spec::exclusions attr_noinline_exclusions[] = +{ + { "always_inline", true, true, true }, + { NULL, false, false, false }, +}; + +static const struct attribute_spec::exclusions attr_target_exclusions[] = +{ + { "target_clones", true, true, true }, + { NULL, false, false, false }, +}; + +static const struct attribute_spec::exclusions attr_target_clones_exclusions[] = +{ + { "always_inline", true, true, true }, + { "target", true, true, true }, + { NULL, false, false, false }, +}; + /* Fake handler for attributes we don't properly support, typically because they'd require dragging a lot of the common-c front-end circuitry. */ static tree fake_attribute_handler (tree *, tree, tree, int, bool *); @@ -165,7 +191,7 @@ const struct attribute_spec gnat_internal_attribute_table[] = { "strub", 0, 1, false, true, false, true, handle_strub_attribute, NULL }, { "noinline", 0, 0, true, false, false, false, - handle_noinline_attribute, NULL }, + handle_noinline_attribute, attr_noinline_exclusions }, { "noclone", 0, 0, true, false, false, false, handle_noclone_attribute, NULL }, { "no_icf", 0, 0, true, false, false, false, @@ -175,7 +201,7 @@ const struct attribute_spec gnat_internal_attribute_table[] = { "leaf", 0, 0, true, false, false, false, handle_leaf_attribute, NULL }, { "always_inline",0, 0, true, false, false, false, - handle_always_inline_attribute, NULL }, + handle_always_inline_attribute, attr_always_inline_exclusions }, { "malloc", 0, 0, true, false, false, false, handle_malloc_attribute, NULL }, { "type generic", 0, 0, false, true, true, false, @@ -192,9 +218,9 @@ const struct attribute_spec gnat_internal_attribute_table[] = { "simd", 0, 1, true, false, false, false, handle_simd_attribute, NULL }, { "target", 1, -1, true, false, false, false, - handle_target_attribute, NULL }, + handle_target_attribute, attr_target_exclusions }, { "target_clones",1, -1, true, false, false, false, - handle_target_clones_attribute, NULL }, + handle_target_clones_attribute, attr_target_clones_exclusions }, { "vector_size", 1, 1, false, true, false, false, handle_vector_size_attribute, NULL }, @@ -6742,16 +6768,7 @@ handle_noinline_attribute (tree *node, tree name, int ARG_UNUSED (flags), bool *no_add_attrs) { if (TREE_CODE (*node) == FUNCTION_DECL) - { - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with attribute %qs", name, "always_inline"); - *no_add_attrs = true; - } - else - DECL_UNINLINABLE (*node) = 1; - } + DECL_UNINLINABLE (*node) = 1; else { warning (OPT_Wattributes, "%qE attribute ignored", name); @@ -7050,12 +7067,6 @@ handle_target_attribute (tree *node, tree name, tree args, int flags, warning (OPT_Wattributes, "%qE attribute ignored", name); *no_add_attrs = true; } - else if (lookup_attribute ("target_clones", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "target_clones"); - *no_add_attrs = true; - } else if (!targetm.target_option.valid_attribute_p (*node, name, args, flags)) *no_add_attrs = true; @@ -7083,23 +7094,8 @@ handle_target_clones_attribute (tree *node, tree name, tree ARG_UNUSED (args), { /* Ensure we have a function type. */ if (TREE_CODE (*node) == FUNCTION_DECL) - { - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "always_inline"); - *no_add_attrs = true; - } - else if (lookup_attribute ("target", DECL_ATTRIBUTES (*node))) - { - warning (OPT_Wattributes, "%qE attribute ignored due to conflict " - "with %qs attribute", name, "target"); - *no_add_attrs = true; - } - else - /* Do not inline functions with multiple clone targets. */ - DECL_UNINLINABLE (*node) = 1; - } + /* Do not inline functions with multiple clone targets. */ + DECL_UNINLINABLE (*node) = 1; else { warning (OPT_Wattributes, "%qE attribute ignored", name);