Re: [Patch, fortran] PR108663 - Accepts invalid bug with pdtXXX
Jerry D <[email protected]>
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <[email protected]> |
On 2/14/26 9:28 AM, Paul Richard Thomas wrote: > Hello All, > > This bug allowed direct references by name to PDT instances. It took > me a long time to have the necessary light bulb moment: The names of > PDT instances never have to go through the scanner and so are not > subject to the ministrations of gfc_wide_tolower. Therefore, rendering > all the letters of the PDT prefix in upper case prevents pdt_types > from being directly referenced in code. > > I took the opportunity to define PDT_TEMPLATE and PDT_TEMPLATE_LEN in > gfortran.h. > > The chunk in resolve.cc is a funny one. I had previously encountered > the test for assumed LEN parameters in typebound procedure dummies > (pdt_37.f03) failing due to apparently unrelated changes in the > frontend. It seems that it is the order of appearance of pdt_templates > and pdt_types that mattered. The problem is fixed by testing for both, > as is necessary for this patch to pass regression testing. > > Regtests OK with FC43/x86_64. OK for mainline? I will be offline for a > few weeks from Monday evening and so I will push the patch then if it > hasn't been reviewed. In the words of Hitchhikers Guide to the Galaxy, > it is "mostly harmless". > > Paul OK for mainline Paul, thanks. Jerry