On Sunday, 31 December 2017 04:10:14 UTC, FortranFan wrote:
On Saturday, December 2, 2017 at 2:27:49 PM UTC-5, paul.rich...@gmail.com wrote:
..
Apart from this, there are issues with type matching in interface comparisons ..
@Paul,
Thanks much for all your effort. Wish you many more retreats to enjoy that lead to many more blessings for the FOSS developers!
Re: your comment above with "issues with type matching in interface comparisons", you may want to consider the test case below as well:
--- begin code snippet ---
module m
type :: t(ell)
integer, len :: ell
integer :: i(ell)
end type
contains
subroutine sub( a )
type(t(ell=*)), intent(inout) :: a
end
end module m
! main program
use m, only : t, sub
type(t(ell=42)) :: foo
call sub( foo )
end
--- end code ---
Upon compilation,Aaaah, its's the 'only' that has done that. I need to make sure that 't' is expanded to encompass the PDT instances in the USE statement.
gfortran.exe -c p.f90
p.f90:20:18:
call sub( foo )
1
Error: Type mismatch in argument 'a' at (1); passed TYPE(Pdtt) to TYPE(pdtt)
This is now PR83646.
Thanks
Paul
On Tuesday, 31 October 2017 20:23:43 UTC, FortranFan wrote:
On Wednesday, September 13, 2017 at 2:04:28 PM UTC-4, paul.rich...@gmail.com wrote:
..
Since you provided me with a rather useful testcase later in this thread ..
.@Paul,
Here's another issue, a nastier one involving an internal compiler error, from a case tried by James Van Buskirk:
https://groups.google.com/d/msg/comp.lang.fortran/7QJAwoKN4Jw/kLuSid-VCgAJ
--- begin code ---
type :: t(ell)
integer, len :: ell
character(len=1) :: s(ell)
end type
integer, parameter :: N = 2
type(t(ell=:)), allocatable :: foo
allocate( t(ell=N) :: foo )
foo%s = transfer(source=repeat("x",ncopies=N), mold=[ character(len=1) :: ], size=N)
end
--- end code ---
Compilation output:
gfortran.exe -c p.f90 -o p.oThis is a problem with the simplification of transfer:
f951.exe: internal compiler error: Segmentation fault
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
integer, parameter :: N = 2
character(len=1) :: chr(N)
chr = transfer(source=repeat("x",ncopies=N), mold=[ character(len=1) :: ], size=N)
end
fails in the same way.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 131 |
Nodes: | 8 (1 / 7) |
Uptime: | 37:37:06 |
Calls: | 2,699 |
Calls today: | 2 |
Files: | 9,260 |
Messages: | 2,268,401 |