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



Paul Thomas <pault at gcc dot gnu.org> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|RESOLVED                    |REOPENED

                 CC|                            |dominiq at lps dot ens.fr

         Resolution|FIXED                       |



--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> 2013-01-14 20:32:04 
UTC ---

ICE noted by Dominique d'Humieres with



module m

  type :: foobar

    real, pointer :: array(:)

    procedure (), pointer, nopass :: f

  end type

contains

  elemental subroutine fooAssgn (a1, a2)

    type(foobar), intent(out) :: a1

    type(foobar), intent(in) :: a2

    allocate (a1%array(size(a2%array)))

    a1%array = a2%array

    a1%f => a2%f

  end subroutine

end module m



Dominique also provided the fix on #gfortran:

in gfc_check_pointer_assign of ../../gcc/fortran/expr.c:3540

replacing if (s2->attr.proc_pointer with if (s2 && s2->attr.proc_pointer

lets the code compile.



Will commit as 'obvious' as soon as it has bootstrapped and regtested.



Paul

Reply via email to