> Thanks.  Though, see Andreas' mail, I think he is right that there is really
> no reason to have that dt_name local buffer at all, just changing
> dt_name from an array to const char *dt_name; and changing the strcpy to
> dt_name = "STAR";
> and the former strncpy (dt_name, ...) to
> dt_name = gfc_dt_upper_string (derived->name);
> should do it.

Certainly.

The functions in question existed long before I became involved in gfortran
development.  AFAIU is only the (rather) receently modified name mangling
to take into account newer Fortran language features that caused the ICE
when the maximum allowed symbol lengths are used.
This is hopefully now fully exerted in the testcase.

Symbol lengths are checked elsewhere.  A user program should not be able to
trigger an ICE here.  (Fingers crossed)

Of course one could always rewrite gfortran to use a more modern C style.
We're all looking for more volunteers!
(I'm much better at Fortran than at C).

Nevertheless, thanks for your patience and your explanations.  They might
positively influence my future contribution.

Harald

Reply via email to