[Bug fortran/126816] [17 Regression] gfortran: ICE building pr46884.f since r17-3155 on some machines

"jvdelisle at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
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;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.