[Bug fortran/93422] Bogus POINTER attribute mismatch with submodule MODULE PROCEDURE

2020-01-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93422

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-01-27
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
It's very old issue, at least as GCC 4.8.0.

[Bug fortran/93422] Bogus POINTER attribute mismatch with submodule MODULE PROCEDURE

2020-01-25 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93422

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug fortran/93422] Bogus POINTER attribute mismatch with submodule MODULE PROCEDURE

2020-01-24 Thread abensonca at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93422

--- Comment #1 from Andrew Benson  ---
Using a "result()" for the return value of the function allows this to compile
successfully:

module t

  type :: a
   contains
 procedure :: p => ap
  end type a

  type, extends(a) :: b
   contains
 procedure :: p => bp
  end type b

  type :: c
  end type c

  type, extends(c) :: d
  end type d

  interface
 module function bp(s) result(ss)
   class(b), intent(inout) :: s
   class(d), pointer :: ss
 end function
  end interface

contains

  function ap(s) result(ss)
class(d), pointer :: ss
class(a), intent(inout) :: s
  end function ap

end module t

submodule (t) ts

contains

  function bp(s) result(ss)
class(d), pointer :: ss
class(b), intent(inout) :: s
  end function bp

end submodule ts