public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/aoliva/heads/testme)] same type and canonical check
@ 2021-11-16 3:49 Alexandre Oliva
0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2021-11-16 3:49 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a57ef090caaf032cd9cab64f4a813190a5a18133
commit a57ef090caaf032cd9cab64f4a813190a5a18133
Author: Alexandre Oliva <oliva@gnu.org>
Date: Wed Nov 10 23:54:53 2021 -0300
same type and canonical check
Diff:
---
gcc/ipa-strub.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gcc/ipa-strub.cc b/gcc/ipa-strub.cc
index c8122a8b9e2..6765b835606 100644
--- a/gcc/ipa-strub.cc
+++ b/gcc/ipa-strub.cc
@@ -1333,7 +1333,12 @@ call_typecast_p (gcall *call)
? fndecl
: TREE_TYPE (gimple_call_fn (call)));
- return fntype && TYPE_MAIN_VARIANT (fntype) != TYPE_MAIN_VARIANT (fn_type);
+ if (!fntype)
+ return false;
+
+ gcc_checking_assert (TYPE_CANONICAL (fntype));
+
+ return TYPE_CANONICAL (fntype) != TYPE_CANONICAL (fn_type);
}
/* Return the effective strub mode used for CALL, and set *TYPEP to
@@ -1404,6 +1409,11 @@ distinctify_node_type (cgraph_node *node)
static bool
same_strub_mode_in_variants_p (tree type)
{
+ if (TYPE_CANONICAL (type)
+ && (get_strub_mode_from_type (type)
+ != get_strub_mode_from_type (TYPE_CANONICAL (type))))
+ return false;
+
for (tree other = TYPE_MAIN_VARIANT (type);
other != NULL_TREE; other = TYPE_NEXT_VARIANT (type))
if (other == type)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-16 3:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 3:49 [gcc(refs/users/aoliva/heads/testme)] same type and canonical check Alexandre Oliva
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).