* (no subject)
@ 2020-07-26 4:49 Damian Rouson
2020-07-26 8:55 ` Arjen Markus
0 siblings, 1 reply; 2+ messages in thread
From: Damian Rouson @ 2020-07-26 4:49 UTC (permalink / raw)
To: gfortran
I believe the gfortran error message below is incorrect. Gfotran 8, 9 and
10 give the same message. The code below compiles cleanly with the NAG
Fortran compiler.
Damian
± cat shape-mismatch.f90
module foobar
type foo
contains
procedure, nopass :: bar
end type
interface
module subroutine bar(arg)
character(len=*) arg(:)
end subroutine
end interface
contains
module procedure bar
end procedure
end module
± gfortran -c shape-mismatch.f90
shape-mismatch.f90:12:22:
12 | module procedure bar
| 1
Error: Shape mismatch in argument 'arg' at (1)
± gfortran --version
GNU Fortran (GCC) 10.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re:
2020-07-26 4:49 Damian Rouson
@ 2020-07-26 8:55 ` Arjen Markus
0 siblings, 0 replies; 2+ messages in thread
From: Arjen Markus @ 2020-07-26 8:55 UTC (permalink / raw)
To: Damian Rouson; +Cc: gfortran
I tried this with Intel Fortran and that accepts the code as well.
Variations in the code do not resolve the problem (different basic
type for arg, using dimension(:), without the nopass attribute).
I suggest you create a PR for this.
Regards,
Arjen
Op zo 26 jul. 2020 om 06:50 schreef Damian Rouson
<damian@sourceryinstitute.org>:
>
> I believe the gfortran error message below is incorrect. Gfotran 8, 9 and
> 10 give the same message. The code below compiles cleanly with the NAG
> Fortran compiler.
>
> Damian
>
> ± cat shape-mismatch.f90
> module foobar
> type foo
> contains
> procedure, nopass :: bar
> end type
> interface
> module subroutine bar(arg)
> character(len=*) arg(:)
> end subroutine
> end interface
> contains
> module procedure bar
> end procedure
> end module
>
> ± gfortran -c shape-mismatch.f90
> shape-mismatch.f90:12:22:
>
> 12 | module procedure bar
> | 1
> Error: Shape mismatch in argument 'arg' at (1)
>
> ± gfortran --version
> GNU Fortran (GCC) 10.1.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-26 8:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 4:49 Damian Rouson
2020-07-26 8:55 ` Arjen Markus
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).