[Bug fortran/108663] Accepts invalid bug with pdtXXX

2023-06-30 Thread pault at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108663

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
 Blocks||82173

--- Comment #2 from Paul Thomas  ---
Added to PDT meta-bug


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
[Bug 82173] [meta-bug] [PDT] Parameterized derived type errors

[Bug fortran/108663] Accepts invalid bug with pdtXXX

2023-02-03 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108663

--- Comment #1 from Steve Kargl  ---
> $ 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.