From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1930) id 9EA7B3987956; Thu, 17 Jun 2021 20:08:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9EA7B3987956 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Martin Sebor To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8607] Backported from trunk: X-Act-Checkin: gcc X-Git-Author: Martin Sebor X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: fbafba7114939b279e860198d009d7641f3ce49c X-Git-Newrev: 00bf3e4d12944e659b3a3706ca720f1d6346e610 Message-Id: <20210617200824.9EA7B3987956@sourceware.org> Date: Thu, 17 Jun 2021 20:08:24 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2021 20:08:24 -0000 https://gcc.gnu.org/g:00bf3e4d12944e659b3a3706ca720f1d6346e610 commit r11-8607-g00bf3e4d12944e659b3a3706ca720f1d6346e610 Author: Martin Sebor Date: Thu Jun 17 12:22:28 2021 -0600 Backported from trunk: Consider size_t mangling as unsigned int and long [PR100876]. gcc/ChangeLog: PR middle-end/100876 * builtins.c: (gimple_call_return_array): Account for size_t mangling as either unsigned int or unsigned long Diff: --- gcc/builtins.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/builtins.c b/gcc/builtins.c index 6f3ace5d124..73c12e3bb8c 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5171,8 +5171,12 @@ gimple_call_return_array (gimple *stmt, offset_int offrng[2], || DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fn)) return NULL_TREE; + /* Check the mangling, keeping in mind that operator new takes + a size_t which could be unsigned int or unsigned long. */ tree fname = DECL_ASSEMBLER_NAME (fn); - if (!id_equal (fname, "_ZnwmPv") // ordinary form + if (!id_equal (fname, "_ZnwjPv") // ordinary form + && !id_equal (fname, "_ZnwmPv") // ordinary form + && !id_equal (fname, "_ZnajPv") // array form && !id_equal (fname, "_ZnamPv")) // array form return NULL_TREE;