- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following gives acompletly whackedspurious error message that indicates that "operator resolution" for a a user defined operator applied to a component of a derived type is being carried out based on the name of a dummy argument ... in a different procedure .... in a different module.
[fortran]
MODULE A
IMPLICIT NONE
PRIVATE
TYPE, PUBLIC :: TypeA
CONTAINS
PROCEDURE :: is_op
GENERIC :: OPERATOR(.is.) => is_op
END TYPE TypeA
CONTAINS
PURE FUNCTION is_op(str, idx) RESULT(mvconc)
CLASS(TypeA), INTENT(IN) :: str
INTEGER, INTENT(IN) :: idx
REAL :: mvconc
mvconc = 0.0
END FUNCTION is_op
END MODULE A
MODULE B
IMPLICIT NONE
PRIVATE
PUBLIC :: irrelevant_proc
TYPE, PUBLIC :: TypeB
END TYPE TypeB
CONTAINS
! Note dummy argument name.
SUBROUTINE irrelevant_proc(My)
TYPE(TypeB), INTENT(IN) :: My
END SUBROUTINE irrelevant_proc
END MODULE B
MODULE C
USE A
IMPLICIT NONE
PRIVATE
INTEGER, PARAMETER, PUBLIC :: rising = 1
TYPE, PUBLIC :: TypeC
TYPE(TypeA) :: exasperation
END TYPE TypeC
CONTAINS
SUBROUTINE proc(My)
TYPE(TypeC), INTENT(INOUT) :: My
PRINT *, My % exasperation .is. rising
END SUBROUTINE proc
SUBROUTINE another_proc
USE B, ONLY: irrelevant_proc
END SUBROUTINE another_proc
END MODULE C
[/fortran]
[plain]
>ifort /c /check:all /warn:all /standard-semantics DottedStringWTF.f90
Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 13.0.0.089 Build 20120731
Copyright (C) 1985-2012 Intel Corporation. All rights reserved.
DottedStringWTF.f90(11): remark #7712: This variable has not been used. [STR]
PURE FUNCTION is_op(str, idx) RESULT(mvconc)
----------------------^
DottedStringWTF.f90(11): remark #7712: This variable has not been used. [IDX]
PURE FUNCTION is_op(str, idx) RESULT(mvconc)
---------------------------^
DottedStringWTF.f90(28): remark #7712: This variable has not been used. [MY]
SUBROUTINE irrelevant_proc(My)
-----------------------------^
DottedStringWTF.f90(45): error #6866: Dotted string neither a defined operator nor a structure component [IS]
PRINT *, My % exasperation .is. rising
--------------------------------^
DottedStringWTF.f90(43): remark #7712: This variable has not been used. [MY]
SUBROUTINE proc(My)
------------------^
compilation aborted for DottedStringWTF.f90 (code 1)
[/plain]
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Ian,
A fix has been found for this issue. We are currently planning to include it the next major release which is scheduled for later this year.
Regards, Annalee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This bug was fixed in the recent Composer XE 2013 SP1 release, released in early September ( version 14.0 of the compiler )
ron

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page