[Bug fortran/108663] Accepts invalid bug with pdtXXX

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Dec 12 17:21:46 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108663

--- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Steve Kargl from comment #1)
> > $ gfortran-13-20221218 -c z1.f90   # missing error
> > $
> > $ gfortran-13-20230115 -c z1.f90
> > z1.f90:12:7:
> > 
> >    12 |    use m, only: t, pdtt, s
> >       |       1
> > internal compiler error: in check_complete_insertion, at hash-table.h:578
> 
> For the record, the entity 'pdtt' is not specified
> in the module.  It is constructed by gfortran in 
> decl.cc(gfc_get_pdt_instance) when parsing a parameterized
> derived type.  The symbol pdtt means PDT type t, and it
> appears to inserted into the namespace.  A likely better
> name would have been _PDT_t, because the leading underscore
> means the name cannot conflict with a user's code and
> gfortran downcases all parsed code so PDT shows that the
> symbol is artificial.

The trouble with a leading non-alpha character is that U/C vs. L/C is used to
distinguish the derived type vs the constructor.

I have been trying to think of a suitable separator between the "Pdt" prefix
and the rest of the name.

Can you remember why '.' was deemed to be unsuitable for class names?

Paul


More information about the Gcc-bugs mailing list