Type bound generics and dotted strings

Type bound generics and dotted strings

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.

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

[U:projectsIFort 13.0 testDottyGoingOnBatty]
>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)

4 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项

Hello Ian,
I have escalated this issue to the developers the issue number is DPD200237125. I will post any updates I receive to this thread.

Regards,
Annalee
Intel Developer Support

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

This bug was fixed in the recent Composer XE 2013 SP1 release, released in early September ( version 14.0 of the compiler )

ron

发表评论

登录添加评论。还不是成员?立即加入