From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id B3D343882169 for ; Thu, 13 Jun 2024 13:34:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B3D343882169 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 B3D343882169 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::336 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; cv=none; b=RiZGv/zBZVMaoeWMrKPzDiSRhZtQW+3yAKNhE3hWUnFTbBqTJEX+6XqMaO8a2obVrMxQIe2IjszfFSp/+s4glnRH3snFqUtag5OMztmHYGs1UZDdKgDG5HjyXpMMHC6AM3nPSejYVK9RCxMnbHBG6XfQjEjHcaZtHHYm8+UzyNY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1718285666; c=relaxed/simple; bh=2bUoCIbQjbAnz3ymTqtdcEmT4zKAcYaPgqTj9VRx3xQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=IRrwRmPH71YzUUPYvlqdT8WfkLb5J6KVi9bNEIXapUUb1LnE3qQPx8Hh0AqWM0V5dUJeBH2kV1Lrtz9jlODBXCa8cGhwAv8YlZ5YZWub7rY5gbunQJ0fVucy3jNiD0I5+HoJu3WEWB/3GQakj37VyWqoRDfiVQIprHFyM0j5Gx4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4217926991fso9983925e9.3 for ; Thu, 13 Jun 2024 06:34:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1718285650; x=1718890450; 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=DPWdPalwbcz00IyeBFPXfeNEEHfOUC6G9Mj6kZJFkrM=; b=QKUD0uADrV46xSSPTYN4Pmw2IalgcJUHmGcOkI4LLyxr2buYPJxfqeN77XwBFXJXEZ 72bvEHpbtCVoVtiQ5SoEkVBEskXqcI172AbX6tmww1rTKlI8gUr4g3BS7lEEo2Y1JWe8 HYGXJx8BFu6+YcBqB0j7qhYO9WpF6rGuDyK4hf+b7DJ00G2Kt/dR91JHHDR7rJTLyXi1 zohVtlC9+8DQyhHqn7IRbpM1dKenrPc210UtEA/AbjDX0OeIj+cbFhxjhC1DFfpB8Vwi RVxoz++tnST+PsIacu7M7j6wl4JkmisnY6B22ujHMa5/+zR+dI16/p/qDJyJ7Wv0himQ XhEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718285650; x=1718890450; 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=DPWdPalwbcz00IyeBFPXfeNEEHfOUC6G9Mj6kZJFkrM=; b=OQjlGJKNjHkgIbezDdKZhHNKAmQSGfZ428XylTwstJ7GoblyEWFEiK6x9rvMPCNF+6 C/HdoP/6EPNGvxPzbIAZNwmXSKqSZM2bUaXh3Vm6JgzbM94lr6pYnR8Y8g/WNYa2nekS YLC0TF/QFiyU5Z3m3XWjDhmsmoNWzsJuGHUxYQh4OA0I6l+ePQKqfewL4KYNDVJK0s05 vgXzoaxRM6wbPRHXG37Kh5MHzIwIcYCxbk/WcQr9Z/TSI3YjqLWfie4QwxTqG4t1lO6G 1zxctLwMImUN/SYdvEgEXGOTxdclkv3LMvA2ePhY5QgVsaqwiiXPe190j7Lgo2bclxDR 5Xzw== X-Gm-Message-State: AOJu0YyVeaZps3m6Xg2roZ1kTJGWiePccRyd3dkNWcwb9FM+bmt8YbcX qS50ZB7CTtyf1vyrk6KwPRynqqHheuNDKexDdKtbUS1Dt7+I83jwGUh5AD01l6rbJqaGtLIYVZI = X-Google-Smtp-Source: AGHT+IFPjs5fyDF8V6f8NVNle114yGm9ighp6US5Lhgh+qoy2PZMuAu6frEKEO5u4sCixW1C/9qIbg== X-Received: by 2002:a05:600c:468c:b0:421:8445:4f8d with SMTP id 5b1f17b1804b1-422866bf75amr32952815e9.38.1718285650538; Thu, 13 Jun 2024 06:34:10 -0700 (PDT) Received: from poulhies-Precision-5550.telnowedge.local (lmontsouris-659-1-24-67.w81-250.abo.wanadoo.fr. [81.250.175.67]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-422870e9145sm62391955e9.22.2024.06.13.06.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 06:34:09 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Yannick Moy Subject: [COMMITTED 26/30] ada: Fix test for giving hint on ambiguous aggregate Date: Thu, 13 Jun 2024 15:33:32 +0200 Message-ID: <20240613133338.1809385-26-poulhies@adacore.com> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240613133338.1809385-1-poulhies@adacore.com> References: <20240613133338.1809385-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 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,T_SCC_BODY_TEXT_LINE 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: Yannick Moy In the case the type of an aggregate cannot be determined due to an ambiguity, caused by the existence of container aggregates, a hint can be given by GNAT. The test for giving this hint should be the Ada language version, not the fact that extensions are allowed. Now fixed. There is no impact on code generation. gcc/ada/ * sem_util.adb (Check_Ambiguous_Aggregate): Fix test. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_util.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index e8120c2adda..3d12f552f41 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -2387,7 +2387,7 @@ package body Sem_Util is Actual : Node_Id; begin - if All_Extensions_Allowed then + if Ada_Version >= Ada_2022 then Actual := First_Actual (Call); while Present (Actual) loop if Nkind (Actual) = N_Aggregate then -- 2.45.1