public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array
       [not found] <bug-83927-4@http.gcc.gnu.org/bugzilla/>
@ 2021-01-28 14:24 ` tkoenig at gcc dot gnu.org
  2021-01-28 19:59 ` dominiq at lps dot ens.fr
  2021-04-16 16:22 ` tkoenig at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-01-28 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
                 CC|                            |tkoenig at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |tkoenig at gcc dot gnu.org

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Seems fixed... I'll try to commit the test case this evening.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array
       [not found] <bug-83927-4@http.gcc.gnu.org/bugzilla/>
  2021-01-28 14:24 ` [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array tkoenig at gcc dot gnu.org
@ 2021-01-28 19:59 ` dominiq at lps dot ens.fr
  2021-04-16 16:22 ` tkoenig at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-01-28 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> Seems fixed... I'll try to commit the test case this evening.

I still get

   31 |   M = v_array_par(1)%MyFunc()
      |      1
Error: Cannot convert TYPE(mytype) to REAL(4) at (1)

with

module Types

  implicit none

  type MyType
    real :: x
  contains
    procedure :: MyFunc
  end type

contains

  pure function MyFunc(this) result(M)
    class(MyType), intent(in) :: this
    real                      :: M

    M = this%x
  end function
end module

program Main
  use Types

  implicit none

  type(MyType), parameter :: v_array_par(1) = [ MyType(1) ]
  type(MyType), parameter :: v_scalar_par = MyType(1)
  type(MyType) :: v_array(1)
  real         :: M

  M = v_array_par(1)%MyFunc()
  print *, M

!  M = v_scalar_par%MyFunc()
!  print *, M

  v_array(1) = MyType(1)
  M = v_array(1)%MyFunc()
  print *, M

end program

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array
       [not found] <bug-83927-4@http.gcc.gnu.org/bugzilla/>
  2021-01-28 14:24 ` [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array tkoenig at gcc dot gnu.org
  2021-01-28 19:59 ` dominiq at lps dot ens.fr
@ 2021-04-16 16:22 ` tkoenig at gcc dot gnu.org
  2 siblings, 0 replies; 3+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2021-04-16 16:22 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|tkoenig at gcc dot gnu.org         |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-16 16:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-83927-4@http.gcc.gnu.org/bugzilla/>
2021-01-28 14:24 ` [Bug fortran/83927] Type-Bound Procedure on element of Derived Type PARAMETER Array tkoenig at gcc dot gnu.org
2021-01-28 19:59 ` dominiq at lps dot ens.fr
2021-04-16 16:22 ` tkoenig at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).