From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id B40623858CDB for ; Tue, 21 May 2024 07:30:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B40623858CDB 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 B40623858CDB Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::335 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716276653; cv=none; b=ZrY7xKDpXV13D6GviaxCuI1uAoAhwfHA2QwrEMPqjQCwomUOzWPJEd6hjKqT6wcgrMrxp4HrnJhvNdMO6F+ZzZRMnA7HMUwcH71DGkCWmdmVdX5hMdAmet5AKInuxQ01MAlNTWeut6KIudvdeH3foiiRTaw5A4j34EdxmcNSRmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716276653; c=relaxed/simple; bh=7mR+vVnrG9e6iwCbWsbGucoag99BSEWMRM5KDVdJDns=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=kT8UhBRyctVobWyluJDKqM5JV6Mqakr5m+5iShGJ2hcDOYQJOYPP0UFR/dt4J/hNyU9vSBkWOThAihty8XA9Z3CdxviW1Zmu5POe6BpGaYPhrphZJveR3T1TuYTqDNMe8OTg56PNHpWy/o4eO7JzQkJxdC4dODRzdFq9ehxyBok= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-420180b5897so27403955e9.3 for ; Tue, 21 May 2024 00:30:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1716276650; x=1716881450; 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=abGRKroYrv0+ZrnFYagQEVeo/AZ4vHxLhr4IAEUKbeA=; b=Ni8+Mb/X4jFnjHd6qL9j39Z1ohmbl7v7VHYlX4rEF/BIFACq5K3P+mmcexw3y55M0Z ozFU2b3j/acVxC56yK7gKNRt654K6VbedaTyNOLjONVwRnbpZdymBRCzOvZ8m7L0+FCt Eqea6giW34FM4yVOeAPfR2GbBZJRi8dJNT32elXIko3Vs2XDf9Un0MbQBhsK7fhkvEwD DWwtwV08VR9q+UO/WIl7IHjR7GU9wm/jjWwoEaAT1nL0Oma2iY7YNovb5S+Kzt3nYxBD 5Zd5C43lkFsFf7Z7MeoBuhKxly96Ubnc5GJQtJd1SraOPj1tLOcQf/6TXGirtz09+ih0 lRjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716276650; x=1716881450; 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=abGRKroYrv0+ZrnFYagQEVeo/AZ4vHxLhr4IAEUKbeA=; b=uzkFA1Wk9riAoNu4SEUGD4WJCQzwUBV0mnUlqqEx1S04+Acp3zcL2Kt9OCmK9+cOjW LDT/Jhf1acdMswdG4KbPNwdfCYhDsoP2kUlUTtxLfySVAEYMywYbnTXlxGDA19QlwVvU p4EvgW7PJJkOH9Amr6AwU3s2iaPMEA2MjjhuTTsNBXpbFVgZqnP50E/2PInKn6F7ZC5M IKn2FejtldXJR32c1cVDrhd63tR3hkW36cruZuGyA1kMOhlnK4K8IFYIlAZ6WZjiupF0 /JqWeZh1q3YnVMQsi8LnCLOYintj1s3Wh/ZYb9sqV8N38nmwSyYpihSySgR1B6unbPNu t5Rg== X-Gm-Message-State: AOJu0Yz8DtoS4kkz4xBe/kL6vDCa+s1A3M3p83oN1aAIxTbGW2lcPdDa crlGSyMgarQNGw9PcpDMPSWde8vXiUarB4zoq3ISNIhYOUCOb7qBVQpJaDdAYPZwz2tpwrqrWwA = X-Google-Smtp-Source: AGHT+IHv2km42kt7Muhy1FTWX1fxnYluSGA6UUCAkR5PbB2tB6YP1JxejtqEeiVicQFguuUhjkrkLQ== X-Received: by 2002:a05:600c:4f0e:b0:420:151e:b205 with SMTP id 5b1f17b1804b1-420151eb4f3mr184467215e9.39.1716276650345; Tue, 21 May 2024 00:30:50 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:de37:8b1c:1f33:2610]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-41fccee9292sm453333645e9.37.2024.05.21.00.30.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 00:30:50 -0700 (PDT) From: =?UTF-8?q?Marc=20Poulhi=C3=A8s?= To: gcc-patches@gcc.gnu.org Cc: Piotr Trojanek Subject: [COMMITTED 03/31] ada: Remove trailing NUL in minimal expansion of Put_Image attribute Date: Tue, 21 May 2024 09:30:06 +0200 Message-ID: <20240521073035.314024-3-poulhies@adacore.com> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240521073035.314024-1-poulhies@adacore.com> References: <20240521073035.314024-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 List-Id: From: Piotr Trojanek When procedure that implements Put_Image attribute emits the type name, this name was wrongly followed by a NUL character. gcc/ada/ * exp_put_image.adb (Build_Record_Put_Image_Procedure): Remove trailing NUL from the fully qualified type name. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_put_image.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb index c23b4e24354..f5141a56626 100644 --- a/gcc/ada/exp_put_image.adb +++ b/gcc/ada/exp_put_image.adb @@ -832,7 +832,9 @@ package body Exp_Put_Image is Parameter_Associations => New_List (Make_Identifier (Loc, Name_S), Make_String_Literal (Loc, - To_String (Fully_Qualified_Name_String (Btyp)))))); + To_String + (Fully_Qualified_Name_String + (Btyp, Append_NUL => False)))))); end if; elsif Is_Null_Record_Type (Btyp, Ignore_Privacy => True) then -- 2.43.2