https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54613

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
At https://gcc.gnu.org/ml/fortran/2016-11/msg00179.html I wrote 

pr54613, sixth and eighth tests,

Actually the tests were extracted from
https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.fortran/5eAz5ns6AG0,
i.e.,

module m2procs 
   implicit none 
   contains 
      recursive function fun(depth) result(r) 
         integer r 
         integer depth 
         integer x(minval([1],mask=[.TRUE.])) 
         integer y 
         save 

         x = 0 
         if(depth > 0) y = fun(depth-1) 
         x = x+1 
         r = x(1) 
      end function fun 
end module m2procs 

program minval2 
   use m2procs 
   implicit none 

   write(*,*) fun(1) 
end program minval2 

and

[Book15] f90/bug% diff -up pr54613_5.f90 pr54613_7.f90
--- pr54613_5.f90       2012-09-18 10:43:48.000000000 +0200
+++ pr54613_7.f90       2012-09-18 10:44:56.000000000 +0200
@@ -4,7 +4,7 @@ module m2procs 
       recursive function fun(depth) result(r) 
          integer r 
          integer depth 
-         integer x(minval([1],mask=[.TRUE.])) 
+         integer x(sum(minloc([1]))) 
          integer y 
          save 

@@ -15,9 +15,9 @@ module m2procs 
       end function fun 
 end module m2procs 

-program minval2 
+program minloc2 
    use m2procs 
    implicit none 

    write(*,*) fun(1) 
-end program minval2 
+end program minloc2

Reply via email to