http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44022

john.harper at vuw dot ac.nz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.harper at vuw dot
                   |                            |ac.nz

--- Comment #3 from john.harper at vuw dot ac.nz 2011-10-06 01:10:36 UTC ---
This gfortran bug happens if the offending subprogram is after CONTAINS in a
main program as well as in a module.

With gfortran -Wall -W this program showed the bug but did print 3.000000 

program test                                                                    
  implicit none                                                                 
  intrinsic sqrt                                                                
  print "(F10.6)",find(sqrt,9.0)                                                
contains                                                                        
  real function find(func,x) ! gfortran -Wall -W warns unused parameter func    
    real,external  ::func                                                       
    real,intent(in)::     x                                                     
    find = func(x)                                                              
  end function find                                                             
end program test                                   

I used two versions: gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) and 
gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC).
I would have installed version 4.6 if I could have.

-- John Harper

Reply via email to