Message ID | 20250107125350.619654-1-poulhies@adacore.com |
---|---|
State | New |
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 537AF385DDF2 for <patchwork@sourceware.org>; Tue, 7 Jan 2025 13:03:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 537AF385DDF2 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=EbF8bBqI X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 8283B3857022 for <gcc-patches@gcc.gnu.org>; Tue, 7 Jan 2025 12:54:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8283B3857022 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 8283B3857022 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=1736254448; cv=none; b=HHYVqps0Vg0sAIPoCFAYC2egng4CqZsvkg4pBpslHsxGRbZYX5gfwteIu7ySAH30rhYkjJIEAO43jcs1cTadmIgu+P4FOW5QGCcEiLcYg2+Oenks0qAvPB13ZTMVm7lQwri0FHZ9VWffey9bJSJMHFgKuEcwzdK8tDhGZNDFzbw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736254448; c=relaxed/simple; bh=5vvp+Sc2u645ItOYQYuofpsa6urGZG6Sr6DPd2YNiMY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=CKOtD2/KBVl59eWDkKLmHlQg+vejxe1KvJgkExdBor0Ox4kxNkNvm9LESuSW2NZawd9aNX84buD7pyzydRcI58mLmgZYJDGhbhfvlqMLKArjCx9752kzqwpsqzOHSVSITmQ693G/jlqBG5JSCEaKrVO4dZa1VaHjfa9Vy4T794w= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8283B3857022 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4361b0ec57aso154039505e9.0 for <gcc-patches@gcc.gnu.org>; Tue, 07 Jan 2025 04:54:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1736254447; x=1736859247; 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=d0WMftl2Rf1MzgU3wGuu6onqGVZwEUzs5aV6mvGRZ6Y=; b=EbF8bBqIXrZNoDpk+TzTJD6ObjYap1uu1G35+EkVJxfFHAKYPAiBe2LJnIxKzEBAUk G47nubChHmG7kx3vy1DqYOwgM25b67tk2KJB47QqSeWxThMNnY3G79LhiwP1nvEefRdx RM/Zt87brZZTTxzbRb/QbpsPGBDl2767STHmgWr4fNEBWspQaJbxj6V/LYDFU7GQT/HV RPyx9m6JLISop7GyqH/LnkwA4pvutqj/AlCtc/GFPvPWguqW4DGrHAwlfj3aSjwiHLAg wd7dGv7K/YfbZQOOGnnJ6zlhXKfQImFSbQCAuXhzgWR6yq31DK6/Dq5/hm9okC2/uYns lkEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736254447; x=1736859247; 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=d0WMftl2Rf1MzgU3wGuu6onqGVZwEUzs5aV6mvGRZ6Y=; b=HgmKmxyNxVHVn6DNLVHFM/CIxBX6u10IKBcDhiBROgl4nLGoqs4Q32aYIl9/g5Djoz cA8hp2Ubfa5WWEmU4CdO8tpwcgs+MMiLaPlPaZuVMg3U0o1IE0IOtYLfbOw7If2Mby9H wC2wGO5+VUUoCsUvubEQe87Gi+4XNCb0+RgdaLBwOy7bBOvyX6l4vhqj4iWcNtlTU5HS /06frfzsxLs/odyuTUgXuHHI81mApVSsWFc1KzE5He/1Jjziw9IlkLimTBjifW8nSS20 KW4oE4SvmSYSscxsh1PN4D4rZO+skwqC+2kclQncwhl04bT5kCqjnO34Mokc0RP5umRH neDA== X-Gm-Message-State: AOJu0Yx2ioguRSKTRJ6+gcVo4ApZd79CO0ugmsNjjf4YUxEP1UyFZNIu 7g7VEHd0GuwYsUP5Ld+ywczr35xSYLHBxBD4rnliCv2Z/vZCld/5s0gTjDCbaCvqjV66c6dlJCE = X-Gm-Gg: ASbGncuel24h0LLLNqoqkXK7g5CVJwM/IMJbZyASAhV8TMazY7f23kofmkE0DVF88UJ PuOiznkYVWlURps3Wg4HNf72Pnk4zcdm+bvQXH/9zXOMMHeAg7ZiqzNZYqlExzff8sz8B5XmLn/ dnn/mS92clunFIPmwYPV8xWk+8QQvuRD/DOCiWnRDzp86ipvwTuVDJ658CY5umLpM2/OWv++kGo /fvRql+ztxGFawXhqmPhT4TecxwCeSWKAbACF9KtF7ExlF2xY0zt7PYlP/XMLI6x1bTfi176+AG zBD6YE5m2wfBUlYzmBR9PIoa5qyxzGG/qmKEgM+a4PWgaGEM1+Wjy0OWuz/rrRg74IW+4HNo X-Google-Smtp-Source: AGHT+IEOkqq1+P83bj/vxHHnQMTQKREfGBNHWPGKLRK+1vs9E3nLHsv9MTUp2UJhB8PrpasMlp+mlw== X-Received: by 2002:a05:600c:35d2:b0:435:d22:9c9e with SMTP id 5b1f17b1804b1-43668646335mr529085845e9.19.1736254447109; Tue, 07 Jan 2025 04:54:07 -0800 (PST) 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-43656af6c42sm631014805e9.9.2025.01.07.04.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 04:54:06 -0800 (PST) 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 01/31] ada: Restrict previous change made to expansion of allocators Date: Tue, 7 Jan 2025 13:53:19 +0100 Message-ID: <20250107125350.619654-1-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 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 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/31] ada: Restrict previous change made to expansion of allocators
|
|
Commit Message
Marc Poulhiès
Jan. 7, 2025, 12:53 p.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
There is no need to build a cleanup if exceptions cannot be propagated.
gcc/ada/ChangeLog:
* exp_ch4.adb (Expand_Allocator_Expression): Do not build a cleanup
if restriction No_Exception_Propagation is active.
* exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Likewise.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/exp_ch4.adb | 1 +
gcc/ada/exp_ch6.adb | 1 +
2 files changed, 2 insertions(+)
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 75d79019f80..6e8c5c83da5 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -636,6 +636,7 @@ package body Exp_Ch4 is and then Nkind (Exp) = N_Function_Call and then not (Is_Entity_Name (Name (Exp)) and then No_Raise (Entity (Name (Exp)))) + and then not Restriction_Active (No_Exception_Propagation) and then RTE_Available (RE_Free) and then not Debug_Flag_QQ); -- Return True if a cleanup needs to be built to deallocate the memory diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index a339a223f09..37184fd28eb 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -8505,6 +8505,7 @@ package body Exp_Ch6 is and then not For_Special_Return_Object (Allocator) and then not (Is_Entity_Name (Name (Func_Call)) and then No_Raise (Entity (Name (Func_Call)))) + and then not Restriction_Active (No_Exception_Propagation) and then RTE_Available (RE_Free) and then not Debug_Flag_QQ then