https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #6)
> Created attachment 54598 [details]
> Tentative patch
> This seems to work on the reduced testcases, can't fully test right now.
I tried it and killed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
--- Comment #6 from Mikael Morin ---
Created attachment 54598
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54598&action=edit
Tentative patch
Indeed the namespaces created during module loading are not stored anywhere, so
they are leaked
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
--- Comment #5 from Mikael Morin ---
This does NOT improve things:
diff --git a/gcc/fortran/module.cc b/gcc/fortran/module.cc
index 601497e0998..2d6c7b8ef73 100644
--- a/gcc/fortran/module.cc
+++ b/gcc/fortran/module.cc
@@ -5258,7 +5258,10 @@ r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
--- Comment #4 from anlauf at gcc dot gnu.org ---
Also:
MODULE m
contains
subroutine bar (arg, res)
class(*) :: arg
character(100) :: res
end subroutine
END MODULE
USE m
END
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
--- Comment #3 from Mikael Morin ---
(In reply to anlauf from comment #2)
> The attachment in pr68800 may serve as a starting point:
>
> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36964
Thanks, reduced:
MODULE m
TYPE :: a
END TYPE
END
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
anlauf at gcc dot gnu.org changed:
What|Removed |Added
CC||anlauf at gcc dot gnu.org
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108925
Mikael Morin changed:
What|Removed |Added
CC||mikael at gcc dot gnu.org
--- Comment #1