diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-04-23 14:43:18 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-04-23 14:43:18 +0200 |
commit | 239cfd92e9ce5014a7616f692e0c6d4f337227b8 (patch) | |
tree | 02e7f6592dba678e4eebd3259f72d1b225c69f53 /gcc | |
parent | c6ffc89f6ef90707ac44240718e258c81f32c7e4 (diff) | |
download | gcc-239cfd92e9ce5014a7616f692e0c6d4f337227b8.zip gcc-239cfd92e9ce5014a7616f692e0c6d4f337227b8.tar.gz gcc-239cfd92e9ce5014a7616f692e0c6d4f337227b8.tar.bz2 |
rs6000: Small improvement to the C++17 ABI fix [PR94707]
Anyway, based on IRC discussion with Richard Sandiford on IRC, we should
probably test type uids instead of type pointers because type uids aren't
reused, but type pointers in a very bad luck case could be, and having the
static var at filescope and GTY((deletable)) is an overkill (and with costs
during GC time).
2020-04-23 Jakub Jelinek <jakub@redhat.com>
PR target/94707
* config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate):
Use TYPE_UID (TYPE_MAIN_VARIANT (type)) instead of type to check
if the same type has been diagnosed most recently already.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-call.c | 7 |
2 files changed, 11 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f299e4..69f07c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-04-23 Jakub Jelinek <jakub@redhat.com> + + PR target/94707 + * config/rs6000/rs6000-call.c (rs6000_discover_homogeneous_aggregate): + Use TYPE_UID (TYPE_MAIN_VARIANT (type)) instead of type to check + if the same type has been diagnosed most recently already. + 2020-04-23 Srinath Parvathaneni <srinath.parvathaneni@arm.com> * config/arm/arm_mve.h (__arm_vbicq_n_u16): Modify function parameter's diff --git a/gcc/config/rs6000/rs6000-call.c b/gcc/config/rs6000/rs6000-call.c index a9ae7ab..d4875dd 100644 --- a/gcc/config/rs6000/rs6000-call.c +++ b/gcc/config/rs6000/rs6000-call.c @@ -5739,14 +5739,15 @@ rs6000_discover_homogeneous_aggregate (machine_mode mode, const_tree type, *n_elts = field_count; if (cxx17_empty_base_seen && warn_psabi) { - static const_tree last_reported_type; - if (type != last_reported_type) + static unsigned last_reported_type_uid; + unsigned uid = TYPE_UID (TYPE_MAIN_VARIANT (type)); + if (uid != last_reported_type_uid) { inform (input_location, "parameter passing for argument of type %qT " "when C++17 is enabled changed to match C++14 " "in GCC 10.1", type); - last_reported_type = type; + last_reported_type_uid = uid; } } return true; |