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
--- 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
--- 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
--- 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
--- 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
---
--- 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'
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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)
12 matches
Mail list logo