[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2016-11-16 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43169 janus at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.5.0

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #11 from janus at gcc dot gnu dot org 2010-03-03 15:17 --- Fixed with r157196. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-03 Thread janus at gcc dot gnu dot org
--- Comment #10 from janus at gcc dot gnu dot org 2010-03-03 15:13 --- Subject: Bug 43169 Author: janus Date: Wed Mar 3 15:12:40 2010 New Revision: 157196 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157196 Log: 2010-03-03 Janus Weil PR fortran/43169 * res

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-03-01 Thread janus at gcc dot gnu dot org
--- Comment #9 from janus at gcc dot gnu dot org 2010-03-01 12:47 --- Even with the patch from comment #7, another thing goes wrong with BLOCK statements: pure subroutine swap implicit none real :: r1 block real :: r2 r1 = 42. r2 = 43. end block end

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-28 Thread domob at gcc dot gnu dot org
--- Comment #8 from domob at gcc dot gnu dot org 2010-02-28 15:07 --- *** Bug 42912 has been marked as a duplicate of this bug. *** -- domob at gcc dot gnu dot org changed: What|Removed |Added ---

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #7 from janus at gcc dot gnu dot org 2010-02-25 13:40 --- (In reply to comment #5) > (In reply to comment #3) > > Seems like statements inside a BLOCK are not being resolved at all?!? > > Sorry, this is wrong. They are resolved alright. The problem is just that > 'gfc_pure'

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus 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 proc

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #5 from janus at gcc dot gnu dot org 2010-02-25 12:16 --- (In reply to comment #3) > Seems like statements inside a BLOCK are not being resolved at all?!? Sorry, this is wrong. They are resolved alright. The problem is just that 'gfc_pure' does not work (checking if we're in

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #4 from janus at gcc dot gnu dot org 2010-02-25 09:19 --- Contained procedures are not affected by this bug, since a procedure contained in a pure procedure must itself be pure. Therefore something like this is invalid (as gfortran correctly detects): module m implicit no

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #3 from janus at gcc dot gnu dot org 2010-02-25 09:13 --- Regarding BLOCK, it seems there is an additional problem: Assignments inside a BLOCK are not checked at all, as the following case shows ... implicit none real :: glob contains pure subroutine swap implici

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #2 from janus at gcc dot gnu dot org 2010-02-25 09:08 --- 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. We have

[Bug fortran/43169] [OOP] gfortran rejects pure procedure with select type construct

2010-02-25 Thread janus at gcc dot gnu dot org
--- Comment #1 from janus at gcc dot gnu dot org 2010-02-25 08:38 --- Confirmed. Here is a reduced test case: pure subroutine swap(x) implicit none type :: myType real :: a end type myType class(myType), intent(inout) :: x select type(x) class is (myType)