public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8607] Backported from trunk:
@ 2021-06-17 20:08 Martin Sebor
  0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2021-06-17 20:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:00bf3e4d12944e659b3a3706ca720f1d6346e610

commit r11-8607-g00bf3e4d12944e659b3a3706ca720f1d6346e610
Author: Martin Sebor <msebor@redhat.com>
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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-17 20:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17 20:08 [gcc r11-8607] Backported from trunk: Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).