This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2010 12:54:57 -0000
- Subject: [Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct
- References: <bug-43169-11768@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from janus at gcc dot gnu dot org 2010-02-25 12:54 -------
(In reply to comment #2)
> The problem lies in gfc_impure_variable (resolve.c), where it is checked if the
> namespace of the variable equals the local namespace of the pure procedure.
> This check fails if the procedure has sub-namespaces.
Actually it seems that 'gfc_impure_variable' works fine, but for SELECT TYPE
the 'gfc_current_ns' is not set correctly.
Setting the namespace happens in 'resolve_codes', but the pureness check
happens inside 'gfc_resolve_blocks'.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43169