From patchwork Tue Nov 28 09:38:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc_Poulhi=C3=A8s?= X-Patchwork-Id: 170643 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3792151vqx; Tue, 28 Nov 2023 01:38:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAQrGfA5jc2HarP2MjwxsM4xnJ2c+dJh9BUHW1OrCZD0krxXniuMmXDcqqOI/+86bK2kka X-Received: by 2002:a05:622a:1715:b0:423:8dd3:b6ff with SMTP id h21-20020a05622a171500b004238dd3b6ffmr15866246qtk.58.1701164339714; Tue, 28 Nov 2023 01:38:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701164339; cv=pass; d=google.com; s=arc-20160816; b=TL6mN2LQmcmpV3t6l31WpcOqRCMUH+6lYWNkMdCFP4sE4UDgjGJxCzXCp6aaTD0KQh /U2Mpp1w4wCwRbDEciGoiTNHh+9k2FLiaqs6LqeVn7VHcnTLCgYgYun7ExRYeIqb9Zz4 wwYjrv9WWWh8rQr9NNtP7wuwjYeuqwn656sEbMBCwuaQzWgPan82Q3Nsz55hendXTUx1 iEtK/LRmJFQ0WBmat3AP24BDfCHQ21P1oiY7L7zPwX7zIRQa4MTyBWdwrQrlTRA914io oKwEgt9KX0T117TyDsosJaxAEDr1hIVd2dO8lcAqa6GzBZxrABrvKmDwMtlDlpkpc/G4 HlSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=iRmA8dq5scS5HKxDp6N59KhwdcwRrzwkmOPbrUcLVGo=; fh=gHiiAcLoZgszWzjxAsgJ2xHalOGO+0WMswi5XIoo7NQ=; b=TjjW5z3DimhfwHUd5xQUQez6u7jCAJPZLTdT3T/UlBtSzZZHRxLRFD7vm+QI7KVqa0 wAN4jpv+gFk5i0bg8NzM4m/qRqHPqM6bHZtf+yjAEn49uR3/azQytJTQ+/WRr2xoz2qP ng86uk6RNrwpJRnTli0vbA0u8YWapLAmU/thkAsHfn2lEXk7XzlSOgHqE0pTdajQKevU R/3+jV+rK1kpOs0aWP7I48NZisH51tjLbHmTOavfpJOTos9pgSpr/xWqxe2yvIPbTXZP /Na0w3YkhUtMfO71q/l6j/jx53r1SwNQD65Am6Pht5zXhVC5zig0iDtWnZk5UTYxQ1c3 4IaQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=bZ0Jw3WM; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id n8-20020ac86748000000b004238bf50e77si10006681qtp.807.2023.11.28.01.38.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 01:38:59 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@adacore.com header.s=google header.b=bZ0Jw3WM; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=adacore.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2E1E33943416 for ; Tue, 28 Nov 2023 09:38:53 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by sourceware.org (Postfix) with ESMTPS id 8102A3940CED for ; Tue, 28 Nov 2023 09:38:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8102A3940CED Authentication-Results: sourceware.org; dmarc=pass (p=none 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 8102A3940CED Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::233 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701164310; cv=none; b=sdusg1DTA5wUCQySsv+IpcP2Cekm6LduDJf3IRfDsPul7GtduG5lHuelEbwo9iBT5EHjZygD/sqNvf+TpQvmYQ2FnoA+h0YEUrVu2eid66GJnwGtmG9qf9WTGOI293AEEDhSubicOmhJMBdjwUzldFLbzukm3G9McGOFY0kWPuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701164310; c=relaxed/simple; bh=JSlJx8Sj2ZMtac7nv6XMVSd2KYnJFzikeQpT1kUO/js=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=G5iIBcc3Ii5jvpCqp3xuVTQ9dlsfPrEEkuY3unvGhXE+TKOdU9F6m7Ghcpd6J4gSW5VQRpM02IC3GhvyOsN+kNtmHPWISNwWdvWNQtbKk3RtIEWKN3oPkRW26n3FdyKce0dKAHXEFJLaAz59PAo/bcYES0Yjb2dFckYfIwRHRS4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oi1-x233.google.com with SMTP id 5614622812f47-3b58d96a3bbso3150086b6e.1 for ; Tue, 28 Nov 2023 01:38:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1701164309; x=1701769109; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=iRmA8dq5scS5HKxDp6N59KhwdcwRrzwkmOPbrUcLVGo=; b=bZ0Jw3WMxG+BdYWkf4VpgwFPKhyAzHdAv8hPxEY/gaSBHE2MoiYiAkY9eYEf+gSeVp 3pN8299nHN8kO/8RKnFED+YHscitZLjcwU5YG/9DzD/ahUXEqDMI0fQhrUKAyG9BXrlq FfmXqi6iwLvYX/tYuWjAGjoT1i4yHBVLN8jn3sAjmwGPAtjVrIXOr96uXlE3NGv9jLbV 7oQbxz4TNz3dZblwREsJJ0CKo9BrVBMSpl11AoP3Gb7M6HqhtSqXjaVDS8xHPyi8i9AF vD2Shs6eKDGNEQS93pOprPSfqMKa3Vj7goBX6ka2nyRliJC4Mu2KON3hmYUySJzhYD5h w66Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701164309; x=1701769109; 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=iRmA8dq5scS5HKxDp6N59KhwdcwRrzwkmOPbrUcLVGo=; b=QRL3LJ1QcNx6diWnEG/iAAXO4w2gSOzUe71EEuAOG2j1ZqrKN+wwWn7QCBlQQ38dUI SFRWmPyhbmeGx8S/0IVZ+hJpfBnCEy9R2qaBCes71f2oKyQfnUqQvc6ElVhowNCeMbjG XWGatsyn7r5Mx1/rmmyvk8koi0sUOGI9v9TYclPRAVCmOdG77qHTh99U07DRO0h2N0bq w7UUeX2egvkH4Ea2EcDvGr1qAxKd2Q67Pz7yYbKs4ryyfgttSN0yvh8zUFZJ47Nk2J/Z lobHKS1JYBYvpxqx3b1PX+prDBDwBJd6EMzxxJYoxcPz6TNH65hPAWK9MDp+ug3CcjxT QBvg== X-Gm-Message-State: AOJu0YzWOiJLiWixpCDKFZqT12OOB6BhjznmXiaXSfITA2opMnLcJ/wF gFK5cVXqEvd/imBtSLk7aB+onpp7FGCRfpnTznn62A== X-Received: by 2002:a05:6808:2395:b0:3b6:d108:1ff3 with SMTP id bp21-20020a056808239500b003b6d1081ff3mr18907197oib.2.1701164308858; Tue, 28 Nov 2023 01:38:28 -0800 (PST) Received: from localhost.localdomain ([2001:861:3382:1a90:a24b:a65f:9576:c701]) by smtp.gmail.com with ESMTPSA id f27-20020a63555b000000b005b6f075da0dsm9016125pgm.25.2023.11.28.01.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 01:38:28 -0800 (PST) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Tucker Taft Subject: [COMMITTED] ada: Fix predicate failure that occurred in a test case Date: Tue, 28 Nov 2023 10:38:09 +0100 Message-ID: <20231128093809.2970405-1-poulhies@adacore.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783800098435140778 X-GMAIL-MSGID: 1783800098435140778 From: Tucker Taft The CodePeer test case illustrating a problem where a "high" precondition failure was expected, died in the GNAT FE on input_reading.adb. The problem was in Check_SCIL, where it didn't properly handle a discriminant_specification. gcc/ada/ * sem_scil.adb: Handle discriminant specification. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_scil.adb | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/ada/sem_scil.adb b/gcc/ada/sem_scil.adb index da8fab69a97..d7679d8b50f 100644 --- a/gcc/ada/sem_scil.adb +++ b/gcc/ada/sem_scil.adb @@ -91,6 +91,7 @@ package body Sem_SCIL is elsif Nkind (Ctrl_Tag) in N_Object_Renaming_Declaration | N_Object_Declaration | N_Parameter_Specification + | N_Discriminant_Specification then Ctrl_Typ := Etype (Defining_Identifier (Ctrl_Tag));