On 18 September 2023 12:19:17 CEST, Julian Brown <jul...@codesourcery.com> wrote: >On Thu, 14 Sep 2023 17:13:02 +0200 >Bernhard Reutner-Fischer via Gcc-patches <gcc-patches@gcc.gnu.org> >wrote: > >> On Tue, 5 Sep 2023 12:28:28 -0700 >> Julian Brown <jul...@codesourcery.com> wrote: >> >> > + static bool >> > + equal (const omp_name_type<gfc_typespec *> &a, >> > + const omp_name_type<gfc_typespec *> &b) >> > + { >> > + if (a.name == NULL_TREE && b.name == NULL_TREE) >> > + return a.type == b.type; >> >> I'm curious if (and why) the type comparison above is safe and does >> not use gfc_compare_types () ? >> >> thanks, > >Probably ignorance on my part! It works for (derived, class) types which >are canonicalized to exactly the same gfc_typespec, but you're likely >right that a more Fortran-ish notion of type equality should be used >here instead when comparing "declare mapper"s.
Sounds like a word2vec question. > >Or maybe using gfc_compare_types would smush too many types together >into one? E.g. if b.type is an extension of a.type, do we want those >types to be able to have separate mappers? I fear this really depends. > >I'll have a look at addressing this when it's time to reroll these >patches. > >Thanks, TIA, PS: I'm not thrilled about those recent get_identifier("") as temporary additions fed into the hasher. I know it's not funny, but please let's avoid that. Said the cat. > >Julian