From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 1F69D3858D20 for ; Mon, 20 May 2024 07:49:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1F69D3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1F69D3858D20 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::332 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716191358; cv=none; b=jSiZI4EhrYW+yS3/7a0zmkdtUMJzf+2qE7tEj4q9PUuQFoNXv4lEPqQOgSCuJ8nTNDC69XXGrJ9XFTV0sDOz333X2H8c2yysp/niXfxJF/PBWJZObxzK2fogkU8pcgydkGrfEdulrLyrbBTfEMlmAXqt8tNsu72QNFwLLL6JfRY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716191358; c=relaxed/simple; bh=gpyqX3dEluHlDDj8s77CTFknXjQrh2gJWjgme40Kh80=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bxkKQknfNe5Nrtv++H/pFbcg/Mn1Adg6FGecN/+2Uj8zQO8/qc5QjVK7G0RHS97AGQY27Erbbj3kBJ8V+J18FTgkPkcbsYTrG3mOcqzaJIi1KpnYWbgkogkxnmGxFmSb3cck1IsKRjIlXtU7MbHuW5/XWJs/xIV1UBFzSVW1La0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-420298ff5b1so24597445e9.1 for ; Mon, 20 May 2024 00:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1716191355; x=1716796155; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UTFMLAo9XQpdKAlAWPaMQEz0FQg9Ounpc2/Tyv32yyk=; b=EYdgBkj+0sKdCN7YnbEImI7QH5cTHROwm02cao1B+ra5oN2jMBbHl72sGI2IaBaUSv IQXLuh7AmTROEE4wJclaAZGjgh6X+q85QNtjDyIa2rgqaEhzZ6yrJ6q/gJD//ddL+Fth GZlqtTk+0zXE9/RZ5cYaicSceEbfQL9AF1ePDhQAdkBLyRTErBeZn1MwWMOiCFbFv+uV msvWa3FSL7F6WlEg6RzUijG9EJewHxWnvrTb3xW64E/zSOrRv7yi9FxACs7F8A3jl1Pz P0THIt4+YMTdTj9qdL99CiPu+HO2jGARFLP7MpoA84ddL244JhklVU/9ueWo0Q1vs/iH pM4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716191355; x=1716796155; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UTFMLAo9XQpdKAlAWPaMQEz0FQg9Ounpc2/Tyv32yyk=; b=bqtma01TRMna3IYboKu2RTlIG3bHK5FWX67z1pt7KwR2WKsB6D9ydwT5K69Yl2qa18 XRzZ+EqBIdth0sHhYAWxW6Nf1A5itMSR1mv5xOIioAVfGDiULAeWJKcwZgvKAMnHqgHk tVWYs596tKag9kYHO5UTl5I3nFD4Q3ANYKIxJG+uly1xH84s5SGjEMgdZbXZioceyXRG 4MNU1IeCJXIibADTmMDGD+cCeC5th9Si5GDPlcsEb4MSnklsssb2pyAfaR262Kiz7YJI dNwV0PGyfofkIJKkx5+xfM1QYxO5+MgQD/W3uH4gW8Jj8HObZrOziPXBDjTPE47TWDDS Wv6Q== X-Gm-Message-State: AOJu0YyGNVl59UeplkUTt9dh3dDSB4GAJJMKDir6sBUjNwzZ1JM5rwy3 f0WyvXuN28oTJV94eNQiEVMtp3b4QmlHVJMkjnlPdcAESndfx4l6z+D0ilI+8YNNxC2iwoDlZyI = X-Google-Smtp-Source: AGHT+IHeo5hGSQKYp0dP0XKoAltTKKUJXlTzo5f7lZ0DWbowgKihbowMueDAs6PA3zhGUY8B/6N3wQ== X-Received: by 2002:a05:600c:3ca3:b0:41c:23f3:65fa with SMTP id 5b1f17b1804b1-41feac55e3cmr265538905e9.28.1716191354886; Mon, 20 May 2024 00:49:14 -0700 (PDT) Received: from poulhies-Precision-5550.lan ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41f88111033sm446892175e9.34.2024.05.20.00.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 00:49:14 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Jose Ruiz Subject: [COMMITTED 04/30] ada: Detect only conflict with synomyms of max queue length Date: Mon, 20 May 2024 09:48:30 +0200 Message-ID: <20240520074858.222435-4-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240520074858.222435-1-poulhies@adacore.com> References: <20240520074858.222435-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.9 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: Jose Ruiz Use of duplicated representation aspect is detected elsewhere so we do not try to detect them here to avoid repetition of messages. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Exclude detection of duplicates because they are detected elsewhere. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 0e2ce9de4b5..a895fd2053a 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -20388,15 +20388,23 @@ package body Sem_Prag is ("pragma % must apply to a protected entry declaration"); end if; - -- Check for duplicates + -- Check for conflicting use of synonyms. Note that we exclude + -- the detection of duplicates here because they are detected + -- elsewhere. - if Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Length) + if (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Length) + and then + Prag_Id /= Pragma_Max_Entry_Queue_Length) or else - Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) + (Has_Rep_Pragma (Entry_Id, Name_Max_Entry_Queue_Depth) + and then + Prag_Id /= Pragma_Max_Entry_Queue_Depth) or else - Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) + (Has_Rep_Pragma (Entry_Id, Name_Max_Queue_Length) + and then + Prag_Id /= Pragma_Max_Queue_Length) then - Error_Msg_N ("??duplicate Max_Entry_Queue_Length pragma", N); + Error_Msg_N ("??maximum entry queue length already set", N); end if; -- Mark the pragma as Ghost if the related subprogram is also -- 2.43.2