public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104097] New: parameterized derived type (PDT) with type-bound procedure
@ 2022-01-18 14:57 vivekrao4 at yahoo dot com
  2023-06-30  8:45 ` [Bug fortran/104097] " pault at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: vivekrao4 at yahoo dot com @ 2022-01-18 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104097
           Summary: parameterized derived type (PDT) with type-bound
                    procedure
           Product: gcc
           Version: og11 (devel/omp/gcc-11)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vivekrao4 at yahoo dot com
  Target Milestone: ---

The code

module m 
implicit none
type :: t(n) 
  integer, len :: n = 0
  integer :: vec(n)
  contains
    procedure :: disp
end type t
contains
subroutine disp(dt)
class(t(n=*)), intent(in) :: dt
print*,dt%vec
end subroutine disp
end module m
!
program main
use m
implicit none
integer, parameter :: n = 3
type(t(n)) :: x
x%vec = [1,4,9]
print*,x%vec
call x%disp()
end program main

compiles and runs with Intel Fortran, giving output 

           1           4           9
           1           4           9

but with gfortran I get

(base) /mnt/c/fortran/test$ gfortran-11 --version
GNU Fortran (Ubuntu 11.1.0-1ubuntu1~20.04) 11.1.0
<snip>

(base) /mnt/c/fortran/test$ gfortran-11 pdt_tbp.f90
pdt_tbp.f90:7:13:

    7 |     procedure :: disp
      |             1
Error: Argument ‘dt’ of ‘disp’ with PASS(dt) at (1) must be of the derived-type
‘t’
pdt_tbp.f90:17:5:

   17 | use m
      |     1
Fatal Error: Cannot open module file ‘m.mod’ for reading at (1): No such file
or directory
compilation terminated.

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

* [Bug fortran/104097] parameterized derived type (PDT) with type-bound procedure
  2022-01-18 14:57 [Bug fortran/104097] New: parameterized derived type (PDT) with type-bound procedure vivekrao4 at yahoo dot com
@ 2023-06-30  8:45 ` pault at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pault at gcc dot gnu.org @ 2023-06-30  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Blocks|                            |82173
   Last reconfirmed|                            |2023-06-30
             Status|UNCONFIRMED                 |NEW
                 CC|                            |pault at gcc dot gnu.org

--- Comment #1 from Paul Thomas <pault at gcc dot gnu.org> ---
Added to PDT meta-bug


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82173
[Bug 82173] [meta-bug] [PDT] Parameterized derived type errors

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

end of thread, other threads:[~2023-06-30  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 14:57 [Bug fortran/104097] New: parameterized derived type (PDT) with type-bound procedure vivekrao4 at yahoo dot com
2023-06-30  8:45 ` [Bug fortran/104097] " pault 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).