- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I attach minimal example. Gfortran 14 seems to compile it fine.
module bugmod
implicit none
public
type :: bugtree_t
contains
procedure, pass(tree) :: in_tree
generic :: operator(.in.) => in_tree
procedure, pass(tree) :: tree_has
generic :: operator(.has.) => tree_has
end type
type, extends(bugtree_t) :: childtree_t
end type
contains
! this seems fine
elemental logical function tree_has(tree, key)
class(*), intent(in) :: key
class(bugtree_t), intent(in) :: tree
tree_has = .false.
end function
! this order will blow up later
elemental logical function in_tree(key, tree)
class(*), intent(in) :: key
class(bugtree_t), intent(in) :: tree
in_tree = .false.
end function
end module
program testbugmod
use bugmod
type(bugtree_t) :: obj
type(childtree_t) :: child
print *, obj .has. "test"
print *, "test" .in. obj
print *, child .has. "test"
! below line causes problem
! print *, "test" .in. child
end program
Error:
test/bug.f90(43): error #6766: A binary defined OPERATOR definition is missing or incorrect. [IN]
print *, "test" .in. child
---------------------^
ifx --version
ifx (IFX) 2025.0.0 20241008
Copyright (C) 1985-2024 Intel Corporation. All rights reserved.
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page