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

--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Possible fix, testsuite running here.

diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
index cee0145c6c7..8b09b8a4709 100644
--- a/gcc/fortran/symbol.cc
+++ b/gcc/fortran/symbol.cc
@@ -3816,8 +3816,12 @@ restore_old_symbol (gfc_symbol *p)
   p->mark = 0;
   old = p->old_symbol;

-  p->ts.type = old->ts.type;
-  p->ts.kind = old->ts.kind;
+  p->ts = old->ts;

   p->attr = old->attr;

Reply via email to