[COMMITTED,06/35] ada: Fix wrong handling of wide wide characters in Append_Decoded_With_Brackets
Message ID | 20241025091107.485741-6-poulhies@adacore.com |
---|---|
State | Committed |
Commit | a71c37a7241d8a73fe51712e5b4c7222afbaee8b |
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 60E783858C39 for <patchwork@sourceware.org>; Fri, 25 Oct 2024 09:12:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by sourceware.org (Postfix) with ESMTPS id 0C7203858C78 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 09:11:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C7203858C78 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 0C7203858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::42f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847499; cv=none; b=RwzekzmEYV9vbie1AE6E+M00ZwSUcNP0AAZsgZkw2a/kaAuNG4lZAXxA/uf1Gf+PEdkrKk7Ko8uUVbFXM/mRVgsZGvwpvt35GKEwlEvE3sulq4RAjb1+8nL1fSZto3ZlN37BIeO6zHy4+0WJpmdL/AL/I7FRqJkoS7weLU/+dto= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847499; c=relaxed/simple; bh=2kdPsjwnCKKDiIdenKlULpp4eYcfVsZ/VkgnDmx5YYE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=tC+VxaeZs1ltZ0K6bDAUD/SWdZD25kGN0euV2pwq/rhpK4hE3Ud9Lm+7Sd58D5pmhG9DFDPtUG3HxDug2kphRPtcsdPRmvflTQnxdNBYLz54y6oulMTjXZ2KoKsDZuhZikJIvhnqp5DyGSojqivMkvM63CZXMt8W1kh2+AJv5UE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-37d518f9abcso1325792f8f.2 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 02:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1729847486; x=1730452286; 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=F7xh6pl3C+R1tcPwsXDWE2OOSzPbRy3XmbLMyrjo8ew=; b=RlfYALpn+GeYPp/2DxrmTtBifv2vqm0ua8exkdijEIh2jrRW1g/qqWF0t31W2ZDyKm uYiVj/jSAMex1i75NiZ/o4tdW9OvBug2TY9D2z1pc7KNWko10kr/yyy5+f4/GdF8VcQQ CMKNccol543pGGqj5xzzScP7ENEFku37JxPmaWBXRRJ13Ib4a2JxLBNoXq3d2A3FhElh omRnpa963yINkyA8GEczFctCE99t4WjTU3V94zx2vVLWOpELR5ApWeSGQZ6IPn+nvbmD MjC+kHyVge+cT+7SDeVb7xd75gh6J0yE1kUG5TI3iiQSXH7AM92m325tIyzeEJZXP9yO Ekuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729847486; x=1730452286; 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=F7xh6pl3C+R1tcPwsXDWE2OOSzPbRy3XmbLMyrjo8ew=; b=kqypFhQOt5KyXjvw3WC0TKJLkFRVaSHZ9GmztV93ErZpDU9O5+FiQvjI9G3d6EEC46 4gFwT956AFLc7OZ2IgCNPiJWwcVV03TLW9gldWkVdZuO/ix7NiZn+9hCj4Eq9Lzorm0O OfLQLjI/dp1NCcb6phidZLfn5WuKC4Wrdhsptx/4rWOaFvG/VKUbiFgMZ0KVhhYZ8yRR grkoO6uHrBq542iygEiRLtZvMF0XtsEzPS/k88hVwSATRqM+K7l1wmtG8UUO8T8LZchR SMcWLi+Qwp1XAKBQqWwDYdSvLsqNAwiCieCCoYqSy1rn7kQERBrL+I+Gk8mdnbTwLgsV ggHA== X-Gm-Message-State: AOJu0Yz2Wm0TKDmcU9CXZtNvkTP+nj6yfx7E2U2V1dY9x6/LXb/wDOEC ZC45Al+yrMW+YDqpNg0TpX4fNZXd8UW8b9Mi9lmsosn2EaJL7RhYyh8hjwf9ElCx96EzEQ5cJSk = X-Google-Smtp-Source: AGHT+IE+bAvolEXA5Y2h+Eq/4QY+iQF4iyFFogGaFLFVIBqyGUUBgt8ozcIABeY2yacdxI5RpSSEog== X-Received: by 2002:adf:f74e:0:b0:37d:3f5c:5a83 with SMTP id ffacd0b85a97d-3803ac970abmr3272472f8f.19.1729847485671; Fri, 25 Oct 2024 02:11:25 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:2626:b78c:6271:6c01]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b47aa8sm1013079f8f.51.2024.10.25.02.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 02:11:24 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED 06/35] ada: Fix wrong handling of wide wide characters in Append_Decoded_With_Brackets Date: Fri, 25 Oct 2024 11:10:35 +0200 Message-ID: <20241025091107.485741-6-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025091107.485741-1-poulhies@adacore.com> References: <20241025091107.485741-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 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/35] ada: Pass parameters of full access unconstrained array types by copy in calls
|
|
Commit Message
Marc Poulhiès
Oct. 25, 2024, 9:10 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
This only shows up at link time when the name of a compilation unit contains
a wide wide character.
gcc/ada/ChangeLog:
* namet.adb (Append_Decoded_With_Brackets): Fix condition for the
cheap test at the beginning of the loop.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/namet.adb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/ada/namet.adb b/gcc/ada/namet.adb index 72f6c2088db..2e3b9c014fc 100644 --- a/gcc/ada/namet.adb +++ b/gcc/ada/namet.adb @@ -474,7 +474,11 @@ package body Namet is P := 1; while P < Temp.Length loop - if Temp.Chars (P + 1) in 'A' .. 'Z' then + -- Cheap test for the common case of no encoding + + if Temp.Chars (P + 1) in 'A' .. 'Z' + and then Temp.Chars (P + 1) /= 'W' + then P := P + 1; -- Uhh encoding