[Patch, Fortran] PR fortran/35837: Fix type-resolving and gfc_current_ns
Tobias Burnus
burnus@net-b.de
Sat Sep 6 18:48:00 GMT 2008
Dominique Dhumieres wrote:
> Concerning a new test case, why not doing the following changes?
>
I'm fine with these changes, that saves us to add another test case just
for one line of code.
Regarding the second added line (FORALL): That is PR 37398
Regarding the third added line: Here, one needs a "dg-error"
> It is also my understanding that the fix will be backported to 4.3.
If yes, it may be not
> necessary to open a reject-valid pr against 4.3(?).
Backporting the fix of PR 35837 is OK from my side (with the usual
few-days delay to wait for regressions).
Tobias
> [ibook-dhum] f90/bug% diff -u /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/stfunc_6.f90 stfunc_6_db.f90
> --- /opt/gcc/_gcc_clean/gcc/testsuite/gfortran.dg/stfunc_6.f90 2007-12-10 17:17:22.000000000 +0100
> +++ stfunc_6_db.f90 2008-09-06 17:41:37.000000000 +0200
> @@ -10,10 +10,13 @@
>
> INTEGER :: st1, i = 99, a(4), q = 6
> st1 (i) = i * i * i
> + st3 (i) = i * v(i) ! This Ok
> FORALL(i=1:4) a(i) = st1 (i)
> FORALL(i=1:4) a(i) = u (a(i)) - a(i)** 2
> if (any (a .ne. 0)) call abort ()
> if (i .ne. 99) call abort ()
> + FORALL(i=1:4) a(i) = st3 (i) ! This should give "Error: reference to non-PURE 'v' at (1) is inside a FORALL block"
> + FORALL(i=1:4) a(i) = v (i) ! This gives "Error: reference to non-PURE 'v' at (1) is inside a FORALL block"
> contains
> pure integer function u (x)
> integer,intent(in) :: x
>
More information about the Fortran
mailing list