Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28633 Discussions

Bug report: problem resolving generic operator after "use..., only :..."

Damian_R_1
Beginner
238 Views
Intel Fortran 12.0 beta produces the error shown below this code. The problem appears to be related to the "only" clause on the use statement. Gnu Fortran 4.6.0 and IBM XL Fortran 13.1 compile the code without error.
$ cat foobar.F90
module foo_module
implicit none
type foo
contains
procedure :: lhs
generic :: operator(.op.) => lhs
end type
contains
function lhs(this,rhs)
class(foo) ,intent(in) :: this
real, intent(in), dimension(:) :: rhs
real, allocatable ,dimension(:) :: lhs
lhs=rhs
end function
end module
module bar_module
implicit none
type bar
real, dimension(:) ,allocatable :: f
contains
procedure :: x
end type
contains
function x(this)
!use foo_module ! This works
use foo_module, only : foo ! This does not
class(bar) :: this
type(bar) :: x
type(foo) :: operand
x%f = operand .op. this%f
end function
end module
$ ifort -c foobar.F90
foobar.F90(31): error #6866: Dotted string neither a defined operator nor a structure component [OP]
x%f = operand .op. this%f
-------------------^
compilation aborted for foobar.F90 (code 1)
$ ifort -V
Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.0.046 Beta Build 20100706
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
ifort: NOTE: The Beta evaluation period for this product ends on 17-dec-2010 UTC.
0 Kudos
1 Reply
Kevin_D_Intel
Employee
238 Views

Thank you for the reproducer. I reported this to Development (internal tracking id below).

As per the terms of the Beta participation, please report future issues with Beta products via Intel Premier and not in public forums. Thank you.

(Internal tracking id: DPD200162600)

(Resolution Update on 06/24/2011): This defect is fixed in the Intel Fortran Composer XE 2011 Update 3 (2011.3.174 - Linux)

0 Kudos
Reply