From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by sourceware.org (Postfix) with ESMTPS id DFA7E385840D for ; Mon, 7 Nov 2022 08:38:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFA7E385840D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-wr1-x433.google.com with SMTP id v1so14996583wrt.11 for ; Mon, 07 Nov 2022 00:38:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p3XGq6mPBlpZNXR5QHhxlFlYn+SAZGqfzgsf5YcME/s=; b=J0/1qK7sReCm/6sd7V9vPqQIuMRmKZ1VIrgn87fXI5nbFlP85QyFPArn93KSbdQqaW 9+6WEiaTRLTGxxzmf71tZt+8HOknUBtDCaCa/X989CJ08x74LlsEd6O6mXj+VEM1+dwR sW6uhBWhm87e10JzWHo70wQ1m2Wg3Buc+XMxNheXSyvzBXPkW5syVT/nnKJ+Nnbq49X1 fAZwP2eUCsb/TQ7IYuM+t+N2sxbC8AeTQetqgBIyv1LBTwRX8xCdhAVBvZIrPNC1jSX8 AuJIjN7C9L5PnIiYjLuIO5M5yUv3exfaFBDfU10QWn5Ryn7v4+9zB5SHojpYQkQKxTmr zxtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p3XGq6mPBlpZNXR5QHhxlFlYn+SAZGqfzgsf5YcME/s=; b=fZL/V2EAF0u8M4W37sedZ+8S3q0CsJFedk9UXIf9lMNhj4dh+LOa0P5k8EPJxjxzhq nhTOn4L7jGONpX9W0Wj9ZSc+fAsvFF2eWQR4KC9yKtibeAD1zsQ8kqTwWDfQqHw8NF1Z OBfyiMQT8C+uLMR/8LXBFb7NkmGn7fek8cigkm8XIh2FQOe4jzX5HLFJQgh/ivSyUoif o0AXHyDYqPAelIQSfTyWutNt+4np4ZExSmSSMR3d1qLu87TSousoqnjmUnrci0VG/PV6 lCIFWC0ohi0VPuYlV9UwuliePr6Ut/eYgE/xGUViGdHxjGG1NqOEf3Yz8VPKwnp45j6I lO6Q== X-Gm-Message-State: ACrzQf33a8h9s0Rk89C4YkfWR2LBSkkrMbZXU+F2cHDbeTpf+NIv8X27 5ptWNaVbnOwEHoZI5/cLYTFPKc4Vjl59lQ== X-Google-Smtp-Source: AMsMyM4Kr/Jd2vwqOWTZHbsVfpufmHp95SkF1IW0U4kwHD6IvWPKFCTaPOga1jXI3vOdUOc1cmQ2DA== X-Received: by 2002:adf:c64d:0:b0:238:8360:e702 with SMTP id u13-20020adfc64d000000b002388360e702mr13448764wrg.643.1667810334524; Mon, 07 Nov 2022 00:38:54 -0800 (PST) Received: from poulhies-Precision-5550.lan (static-176-191-105-132.ftth.abo.bbox.fr. [176.191.105.132]) by smtp.gmail.com with ESMTPSA id g4-20020a5d5404000000b00228d52b935asm6645214wrv.71.2022.11.07.00.38.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Nov 2022 00:38:54 -0800 (PST) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED] ada: Remove useless validity suppression for attribute Input Date: Mon, 7 Nov 2022 09:38:28 +0100 Message-Id: <20221107083828.150145-1-poulhies@adacore.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP 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: From: Piotr Trojanek Attributes 'Input and 'Read are similar, but only the 'Read denotes a subprogram with parameter of mode OUT where operand validity checks need to be suppressed. Cleanup related to fix for attributes 'Has_Same_Storage and 'Overlaps_Storage. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Remove useless skipping for attribute Input. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_attr.adb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 1ef30656496..25f16276c5e 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -2002,8 +2002,8 @@ package body Exp_Attr is -- -- Skip check for output parameters of an Asm instruction (since their -- valuesare not set till after the attribute has been elaborated), - -- for the arguments of a 'Read or 'Input attribute reference (since - -- the scalar argument is an OUT scalar) and for the arguments of a + -- for the arguments of a 'Read attribute reference (since the + -- scalar argument is an OUT scalar) and for the arguments of a -- 'Has_Same_Storage or 'Overlaps_Storage attribute reference (which not -- considered to be reads of their prefixes and expressions, see Ada RM -- 13.3(73.10/3)). @@ -2011,7 +2011,6 @@ package body Exp_Attr is if Validity_Checks_On and then Validity_Check_Operands and then Id /= Attribute_Asm_Output and then Id /= Attribute_Read - and then Id /= Attribute_Input and then Id /= Attribute_Has_Same_Storage and then Id /= Attribute_Overlaps_Storage then -- 2.34.1