Message ID | 20240802071210.413366-6-poulhies@adacore.com |
---|---|
State | Committed |
Commit | a846b4cfc7383e7a2550993cbf669b94db838069 |
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 DB030385F024 for <patchwork@sourceware.org>; Fri, 2 Aug 2024 07:15:01 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 D7B2A385DDEC for <gcc-patches@gcc.gnu.org>; Fri, 2 Aug 2024 07:12:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D7B2A385DDEC 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 D7B2A385DDEC 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=1722582752; cv=none; b=At3tNB0TwwAONn83D7ytrVMDL09nLMFwcUzfTBpEIvyo/kJc3n1Dq+40b9cGBE8tEabQwRwddZqiIEnL024CR3rgdwzgPs8yZKwtP1Wxw40D4eKwhlNB93XhXkGW6MrY1Z/IuiSd3yiITrXmqKUdbMwq2xVBWWsmqxBYSpSCOkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1722582752; c=relaxed/simple; bh=pnBdYEnt5oj4WPxqXCTBZkscWRvaDQv+WFdAkYWUes0=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=c8y/Vc+jTdVsSXvWgXN7PAF7QAylRLxx6fSHqBgX8UPD6oNfe0+UgbFxZtkt/EPTnhwIwGTYDXLHwQ532wEierRlqJeWxlvfnLe2BmcOAbw2WaWqaMTM2M/GGRi9zSd27uXlEnMYAcaCOzxk9aK1fRx2f7gXwk8ErOEhvfj3SYQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-428101fa30aso51835405e9.3 for <gcc-patches@gcc.gnu.org>; Fri, 02 Aug 2024 00:12:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1722582748; x=1723187548; 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=x9U92FE99DnPn+nsnQEY3jN2NojvThnVuJLLJAKWhnc=; b=eCCO6aozz3st/RiyIvaoC8H6C45eFKZ/2X9J++vhQrgUxEWSw2ZZkAaUCtY5N2cpHv UoyppKBDE6+b63TnSPPXAVzl3oPHFQLwTxFCQEWvY+DhCP5vp5nuC87GE3s/5cHq1qWK 34E6bLhYcO/6qvEA4tXSJxOrPUAKT7lF1rdLNJNPxKCJq3uqrc2MkutYo86OeWclVl4a IEkBoGusBvnjwNShuRB6pDVnsLdPYvM1IVURV1xzly2Kv56RqWamsYiML/pwMRdxPV2z RMaaSag7mQTeYIL1Ti5BDxA6+D6umyqiJ1vg/sz/qQCWw9nO2Oy1b6Wi0nLMSkHCQJg6 Asng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722582748; x=1723187548; 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=x9U92FE99DnPn+nsnQEY3jN2NojvThnVuJLLJAKWhnc=; b=VMOTYwmK7JQ8aRe+W9wpKrKukfsKRJ3DDGP9ZwruYYT7tNVNINPi/b9He58o9XquSx cERwW/u0SVezlri00IjUvXLtpJwwcOairn2qHhH47x0CQgFBaVyw/uL2eMmhkMKdlMi9 7p3Ngk15uK4qV4cFy8CiOxZbg4a2n9eoULtxoBEpPxjj4g5k/wE0cZ0h365T98hjPiPe WlCPLvjr6Upud31Ks+MoeKCuR2XcH7F9gx018nrLGHkz52/dTFsCX2xmm6F75yQ5pLKa kyrhpOUFC9m31SscQ7PHqBdTaK0HiI0w5nc86uRwrUjqolBPl72t0IOB5CxIxQaEB/Ng wjWw== X-Gm-Message-State: AOJu0YydA4g3B5fNnxE6AGE1N99vClb7U+yOv+23BrG+EZNBylVOF/qV T2hQsqmAzERNqQ5o5xYLvrZ0kjMOhOjLgvCoj6dattaepkY/mdxg+m0U2jDb/seFRbFK/VKY3Ha o8w== X-Google-Smtp-Source: AGHT+IEivKlnBiouQucwGj/IrcaRnC8eGywayREDy7IVuVNoG/B3RIx2v8zSF5QKNoZJ5zos8KLuVQ== X-Received: by 2002:a05:600c:1e24:b0:427:abf6:f0e6 with SMTP id 5b1f17b1804b1-428e6af4e15mr15876635e9.9.1722582747717; Fri, 02 Aug 2024 00:12:27 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:b6aa:4751:9ea1:da1e]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbd059932sm1195770f8f.69.2024.08.02.00.12.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Aug 2024 00:12:27 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Steve Baird <baird@adacore.com> Subject: [COMMITTED 06/26] ada: Type conversion in instance incorrectly rejected. Date: Fri, 2 Aug 2024 09:11:23 +0200 Message-ID: <20240802071210.413366-6-poulhies@adacore.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240802071210.413366-1-poulhies@adacore.com> References: <20240802071210.413366-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.8 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 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 |
[COMMITTED,01/26] ada: Fix detection of suspicious loop patterns
|
|
Commit Message
Marc Poulhiès
Aug. 2, 2024, 7:11 a.m. UTC
From: Steve Baird <baird@adacore.com>
In some cases, a legal type conversion in a generic package is correctly
accepted but the corresponding type conversion in an instance of the generic
is incorrectly rejected.
gcc/ada/
* sem_res.adb (Valid_Conversion): Test In_Instance instead of
In_Instance_Body.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_res.adb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 8a18430ff58..9a3b6ddbb53 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -14697,7 +14697,7 @@ package body Sem_Res is -- If it was legal in the generic, it's legal in the instance - elsif In_Instance_Body then + elsif In_Instance then return True; -- Ignore privacy for streaming or Put_Image routines