public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-1490] Consider size_t mangling as unsigned int and long [PR100876].
@ 2021-06-15 18:47 Martin Sebor
0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2021-06-15 18:47 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:71790f398e119c7fed867b0cfce60a7500629dff
commit r12-1490-g71790f398e119c7fed867b0cfce60a7500629dff
Author: Martin Sebor <msebor@redhat.com>
Date: Tue Jun 15 12:42:06 2021 -0600
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 75419cc4edc..855ad1eb6bb 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -5183,8 +5183,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-15 18:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 18:47 [gcc r12-1490] Consider size_t mangling as unsigned int and long [PR100876] 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).