https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82606
--- Comment #4 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #1)
> BTW, with an invalid modification (--> fortran/decl.c:3244) :
>
>
> $ cat z4.f90
> program p
> type t(a, b, *)
> integer, kind :: a
> integer, len :: b
> real(a) :: r(b)
> end type
> type(t(8, 3)) :: x
> real(x%a) :: y
> end
>
>
> $ gfortran-8-20171015 -c z4.f90
> f951: internal compiler error: Segmentation fault
> 0xb5a08f crash_signal
> ../../gcc/toplev.c:326
> 0x679fa3 gfc_get_pdt_instance(gfc_actual_arglist*, gfc_symbol**,
> gfc_actual_arglist**)
Index: decl.c
===================================================================
--- decl.c (revision 253587)
+++ decl.c (working copy)
@@ -3241,6 +3241,9 @@ gfc_get_pdt_instance (gfc_actual_arglist *param_list,
name_seen = true;
param = type_param_name_list->sym;
+ if (!param)
+ goto error_return;
+
c1 = gfc_find_component (pdt, param->name, false, true, NULL);
if (!pdt->attr.use_assoc && !c1)
{
gfcx -c b.f90
b.f90:7:11:
type(t(8, 3)) :: x
1
Error: Invalid character in name at (1)
b.f90:8:10:
real(x%a) :: y
1
Error: Symbol 'x' at (1) has no IMPLICIT type