Message ID | 20241129035404.3363162-4-tejas.belagod@arm.com |
---|---|
State | Committed |
Commit | 47fa008ad880c115bce4007fe9808e48b0dcf859 |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 75D393858D26 for <patchwork@sourceware.org>; Fri, 29 Nov 2024 03:56:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75D393858D26 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LUHw7jN+; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=LUHw7jN+ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20612.outbound.protection.outlook.com [IPv6:2a01:111:f403:2614::612]) by sourceware.org (Postfix) with ESMTPS id 400483858D28 for <gcc-patches@gcc.gnu.org>; Fri, 29 Nov 2024 03:54:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 400483858D28 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 400483858D28 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2614::612 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852471; cv=pass; b=UAYnYzGehqHBS4SDwKvVivakm8aa/HYIb1AoK+7EcT/10RMw5g0ES3mbVWlb3TxIO+zf9+J1Y2VHYqXRRb/SpgPgUEFuA3KHkAqU/jGUXU18I6Sx7KlPkbp5CzxI2GXEiDyqI+aNErtogflTkDHBtuBcEXpxCL9SWS2Ozjm8+ko= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1732852471; c=relaxed/simple; bh=7RoyNn3RFYjBFdvRmnmlra1asPTsupvq7wM1W2rcyrA=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=BxiaxJP+oW8iya5ZiBFvqKWMlT4dh4g25iHMGS7MtFtC4i7EIZEPHqLwKkYyw12x84iX/u3oQZKIl9cAe5mKb0nhiBUq7UpYu+0q8hRAAfGweSsRjy7DJdTtIMZOuRxSDZxr7g7KO1EEJ85i1KiFwUGkhD7GcFjEwbht5y+EY58= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 400483858D28 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=iZzxyIPTtV5cyubBNg3NU+mi4a+Pg+NkDzKXq1wTq9w+CYkDhkSIWSBXXu03kErASGvXO1acBqb/JrEYBMW/xnJdvUTbyPF80K+fohE6cufzom5XvQuiw/I8KFSSsOv46H5snHKYK0CrWWl05JrnnfUqihyDksDDtx1Nl7v1nU+EXJwuJLWqfFrFiLndA57TCnkIBXoc1gDgF3Dwm0p9Kni7u2BpSouHs8dHXwkZtKtS5jwVqiERhCW2DtdDkqtARzIU8IreXtCi7SRZuuXr4ru1uPwhylh2aQJcfVBKqrAYFR+WFJ1Y/GI1DaTNlslRT+ZOJhZuiEV8W9Vy+qKKHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=Ml4BXwdHzp2CVKMOzqrZixH7oSo0cVgLstyNXNeGxyOdxhk0GOuey8BzH4Q4LI2tPsin6MH9caPytTSNZuEjuD7aZIQoJGJAwZSoMzLkv7QQprpcWrz6MtMJMakY+Ja3VKpT3cssRJ5OR5liR9CKtvPTR3pVUlp80zyd7h8jpJsVcJKBWFNpoCspUauy70J7E8hHKbzFBh7rXFZrjGTHTKjIFmc0X0sGvaoQ/kqxD/51DdSqcVG3KQXNtkjxnCwScU2dqcGhHC2LCGOXNir4GArgQUE+5BJ9EokO4yGhUAt8EgPldDE/NgWc83CkWJdZoWvUOelueLpcSRRCoNxGcQ== 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=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=LUHw7jN+mvCegedf9KJJ/i85q4dBNAV7cDlcPZATHGJqefkstRJnKWM6fuV9tYanILCsH3lXCvzD8FPlAif+GX3hNmwdlVA6htRHSz413PZVueqwrbgxKSJ7tEcwzDV2smu9vkbvt4U9TNBDIBgWbC/U7yTX0XnnmSbI8qCnWlY= Received: from PA7P264CA0367.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:37c::10) by GVXPR08MB8211.eurprd08.prod.outlook.com (2603:10a6:150:17::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.14; Fri, 29 Nov 2024 03:54:26 +0000 Received: from AM4PEPF00025F97.EURPRD83.prod.outlook.com (2603:10a6:102:37c:cafe::5) by PA7P264CA0367.outlook.office365.com (2603:10a6:102:37c::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:26 +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=arm.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 AM4PEPF00025F97.mail.protection.outlook.com (10.167.16.6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.0 via Frontend Transport; Fri, 29 Nov 2024 03:54:26 +0000 Received: ("Tessian outbound 2e0b2b8680ec:v514"); Fri, 29 Nov 2024 03:54:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 53f15093b29faa46 X-TessianGatewayMetadata: 11VLXmVz1CuFGN4ifUFGUF0jMbXLdaMdZ3MtcParNnIbnMeH3+zMC1WHP9RdVXPd/F7nG5apx9kdwBz7sq+L0eSrlH1GFX/xEQu04h7cbLZALFm1NRB5zZI6uGaW+IU2V/ESCTEEY3pBaOmAN4D+/CdMoeratEhNaSXWqpA25Tg= X-CR-MTA-TID: 64aa7808 Received: from Lb5699ae5c54d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C5DEF9FE-471E-488D-B765-834D5E33A301.1; Fri, 29 Nov 2024 03:54:18 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb5699ae5c54d.1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 29 Nov 2024 03:54:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Sd/pWnizWVjnsMwbFlNzf8oXJx1C6t8WykXP+rgpqyLUXllkaHjzihsyjq/rpl6rAHHl75tOwmu6vLt2kTFl+fMr9kfthKxJCNiw4vb9QUY1/W6k2jzMEVdltS23KsT/LS8+HuBOsMrWBBCKXTCOSNjQ38haKSHxsjnb3YOUXXZ8JaxBhX8k91WfdBXsjKHr/bDbNpWuTi4Znl65qyVE9cXCtRJEu9X23jPqNF1FRl/79FfGihODbqJC3vZOwyTAz6gov1a/AVk9zgqtIjqNSdEJagGLHnEZn5RxjQGvaoMw/UTGvBHzM5lqQ4z+Kd9hxjGkHkrX+KBdwpW/G9T+nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=kBTkdLDfyO5uuAdFLfhi+60ZlFlNpoNuGcPvcgEI4DgIul88/T4xil64dvx/VMMLnekChsX7ondYLtmZHqY0vZFOuLicUKXEK6mEvlx6UJ6mGu+AYCTFXWkCvLQ3srTU0PWPiZ3woP2bi82tMkabdbX6vF0LIwWwBQdpm+ra2eihYShQ/Nhe/t8y2DK152nWeiulS/iK87dYCMw9AEHnlwTm0TYKpHdsOEu7uvYQvNbSIHMZb0mwyKY5wAMianrMZ77pSDMOOdW94knkoxjRk9XI7E7wmAUx+H5BStDB3aQ5ojkP5ZOoYwdd6uSeOCdpd5OdpuOwXnCAdFp30Y0R+g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RAUBFqtSJFw4Wliup0eaPa6tdWlsXIhW0mRZtvb2+FE=; b=LUHw7jN+mvCegedf9KJJ/i85q4dBNAV7cDlcPZATHGJqefkstRJnKWM6fuV9tYanILCsH3lXCvzD8FPlAif+GX3hNmwdlVA6htRHSz413PZVueqwrbgxKSJ7tEcwzDV2smu9vkbvt4U9TNBDIBgWbC/U7yTX0XnnmSbI8qCnWlY= Received: from DUZPR01CA0246.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b5::12) by AS8PR08MB8899.eurprd08.prod.outlook.com (2603:10a6:20b:5b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.15; Fri, 29 Nov 2024 03:54:15 +0000 Received: from DB1PEPF00050A00.eurprd03.prod.outlook.com (2603:10a6:10:4b5:cafe::92) by DUZPR01CA0246.outlook.office365.com (2603:10a6:10:4b5::12) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8207.14 via Frontend Transport; Fri, 29 Nov 2024 03:54:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB1PEPF00050A00.mail.protection.outlook.com (10.167.242.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8207.12 via Frontend Transport; Fri, 29 Nov 2024 03:54:14 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:14 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Fri, 29 Nov 2024 03:54:13 +0000 Received: from a078660.blr.arm.com (10.162.46.14) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 29 Nov 2024 03:54:11 +0000 From: Tejas Belagod <tejas.belagod@arm.com> To: <gcc-patches@gcc.gnu.org> CC: Tejas Belagod <tejas.belagod@arm.com>, <richard.sandiford@arm.com>, <rguenther@suse.de>, <josmyers@redhat.com>, <jason@redhat.com>, <polacek@redhat.com> Subject: [PATCH v3 3/8] c: Range-check indexing of SVE ACLE vectors Date: Fri, 29 Nov 2024 09:23:59 +0530 Message-ID: <20241129035404.3363162-4-tejas.belagod@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241129035404.3363162-1-tejas.belagod@arm.com> References: <20241129035404.3363162-1-tejas.belagod@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB1PEPF00050A00:EE_|AS8PR08MB8899:EE_|AM4PEPF00025F97:EE_|GVXPR08MB8211:EE_ X-MS-Office365-Filtering-Correlation-Id: c7358e3d-b170-4788-18cf-08dd1029849a x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info-Original: 62VxAfK4ljCs7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hzPwNalpMtAsMcAB/oNCvaq3ycW1XIDKtuIlV9oowqmv1/532iJEZPCIVgAwmicPBpjr2Bt12FTbU0JmQcKnKyW9QIJv1LDrk2/Go+Ms2bzEqK6+1I5r/bUJg8XQwmvwIcdAMf7Rv0IvEN20HVRglRnJy5cuqHR0CwK5dXB/T03wQ1bYiKSjXKk5titkuu/H+5K7bKeb2BRIgdMHFqZ4XcoPOYDFCtirZIjZqPMOF546oZvD6ofxFBjlOzcrgu6Q7X2ji0d4QIPRbC44ysQTAo4PJqchLi4TrgFTBFYjWeK/XgizGIRNJMZViHUUj3Zbcfsug8H0Z6szvMpyx8Veqd8nolE/BGWy/sU0p9DHSee5sr16I/G12jx7 X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8899 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:4b5::12]; domain=DUZPR01CA0246.eurprd01.prod.exchangelabs.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F97.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 510f4a7b-b23d-41b3-2e7f-08dd10297de9 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|14060799003|82310400026|1800799024|35042699022; X-Microsoft-Antispam-Message-Info: ZQ6iyNaI8hJcaLD+jWOCtrABKEotHM0b6s0Zj8uPtPDbSQpNhpxZGW+XVwj910nZHXbyQI9DoxMJJXvTBOXwt7Z6Gk2/d4ZE3WR8M7VyNzDkJbIqg/SjRWhCvFdZoRzsmDzgh8+ulqfZ4SYCPJtQIduZA6mulGBHx25w7sjAwEAewUg9/CzCeK5X9S1uZX+ggMzQ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2mEjoW7Xj8X1U2Ve+WltlEqLsMURt4OB2/uems28OoOD7tVZeNcKJvcakaX55TViEjQp912oITomWhCN4vSD2qJwGNoQCYaPIhaWN6r8HcCBRqMq9kSHj2I5MWEUBA5fEM8JGn4a5CqhEqjq8HkR+lasvHHxRWx647M+uD/3Bw/qBmjw00xf7YTWlY35RmdKamAXnj 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:64aa7808-outbound-1.mta.getcheckrecipient.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(14060799003)(82310400026)(1800799024)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 03:54:26.0248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7358e3d-b170-4788-18cf-08dd1029849a 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: AM4PEPF00025F97.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB8211 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, 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 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>, <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>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
aarch64: Enable C/C++ operations on SVE ACLE types.
|
|
Commit Message
Tejas Belagod
Nov. 29, 2024, 3:53 a.m. UTC
This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-family/c-common.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index 721407157bc..260c2e005e6 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -9045,10 +9045,12 @@ convert_vector_to_array_for_subscript (location_t loc, ret = !lvalue_p (*vecp); index = fold_for_warn (index); - if (TREE_CODE (index) == INTEGER_CST) - if (!tree_fits_uhwi_p (index) - || maybe_ge (tree_to_uhwi (index), TYPE_VECTOR_SUBPARTS (type))) - warning_at (loc, OPT_Warray_bounds_, "index value is out of bound"); + /* Warn out-of-bounds index for vectors only if known. */ + if (poly_int_tree_p (index)) + if (!tree_fits_poly_uint64_p (index) + || known_ge (tree_to_poly_uint64 (index), + TYPE_VECTOR_SUBPARTS (type))) + warning_at (loc, OPT_Warray_bounds_, "index value is out of bound"); /* We are building an ARRAY_REF so mark the vector as addressable to not run into the gimplifiers premature setting of DECL_GIMPLE_REG_P