------- Comment #1 from janus at gcc dot gnu dot org 2008-09-22 16:50 ------- Created an attachment (id=16381) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16381&action=view) patch
The attached patch is as far as I got with this up to now. It regtests fine and makes the following modified version of the test case in comment #0 compile (I think in the original test case there was a "p" missing in the first common block): subroutine one() implicit none integer :: a,b procedure(real), pointer :: p common /com/ a,p,b print *,a,b,p(0.0) end subroutine one program main implicit none integer :: x,y intrinsic cos procedure(real), pointer :: func1 common /com/ x,func1,y x = 5 y = -9 func1 => cos call one() end program main Although this test case compiles without error, it gives the wrong output: 5 -9 NaN -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36592