Discussion:
[Patch, Fortran, F08] PR 86888: allocatable components of indirectly recursive type
Dominique d'Humières
2018-08-31 12:33:57 UTC
Permalink
Hi Janus,
Thanks, Paul. Committed as r263782.
Up to revision r263781, gfortran compiles the following test (pr71764 comment 3)

module sqlite3_primitive
use iso_c_binding, only: c_funptr
end module sqlite3_primitive

module fsqlite_runtime

use sqlite3_primitive

use, intrinsic :: iso_c_binding, only : c_null_funptr, c_funptr

implicit none

contains

subroutine fsqlite_exec
type(c_funptr) to_cb
to_cb = c_null_funptr
end subroutine

end module

Starting at r263782, I get the error

pr71764_1.f90:7:6:

7 | use sqlite3_primitive
| 1
Error: Derived type 'c_funptr' at (1) has not been declared

Is this expected? If no, I’ll file a new PR. If yes, why (the error message is quite confusing)?

I also get the same error with the first test in comment 4, but not with the other variants.

TIA

Dominique
Janus Weil
2018-08-31 13:32:44 UTC
Permalink
Hi Dominique,
Post by Dominique d'Humières
Thanks, Paul. Committed as r263782.
Up to revision r263781, gfortran compiles the following test (pr71764 comment 3)
module sqlite3_primitive
use iso_c_binding, only: c_funptr
end module sqlite3_primitive
module fsqlite_runtime
use sqlite3_primitive
use, intrinsic :: iso_c_binding, only : c_null_funptr, c_funptr
implicit none
contains
subroutine fsqlite_exec
type(c_funptr) to_cb
to_cb = c_null_funptr
end subroutine
end module
Starting at r263782, I get the error
7 | use sqlite3_primitive
| 1
Error: Derived type 'c_funptr' at (1) has not been declared
Is this expected? If no, I’ll file a new PR.
this is certainly not expected. Please file a new PR and assign it to
me. Thanks for reporting!

Cheers,
Janus

Loading...