- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you have a module procedure that is explicitly marked PUBLIC, and you try and use that procedure for a binding for a type definition that is local to another procedure, then current ifort complains that the name of the module procedure doesn't have an explicit interface.
Delete the PUBLIC statement for the procedure in the specification part of the module, and all is well...
MODULE m IMPLICIT NONE PUBLIC :: True PUBLIC :: False !<<<< Delete this and things work. TYPE, PUBLIC :: TraitsType CONTAINS PROCEDURE, NOPASS :: XYZ => True END TYPE TraitsType TYPE, PUBLIC :: Thing CLASS(TraitsType), ALLOCATABLE :: traits END TYPE Thing CONTAINS SUBROUTINE proc(arg) TYPE(Thing), INTENT(OUT) :: arg TYPE, EXTENDS(TraitsType) :: local_traits CONTAINS PROCEDURE, NOPASS :: XYZ => False END TYPE local_traits ALLOCATE(arg%traits, SOURCE=local_traits()) END SUBROUTINE proc FUNCTION True() RESULT(b) LOGICAL :: b b = .TRUE. END FUNCTION True FUNCTION False() RESULT(b) LOGICAL :: b b = .FALSE. END FUNCTION False END MODULE m
>ifort /check:all /warn:all /standard-semantics "2015-09-07 true.f90" Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0 Build 20150815 Copyright (C) 1985-2015 Intel Corporation. All rights reserved. 2015-09-07 true.f90(20): error #8182: The name is neither an abstract interface nor a procedure with an explicit interface. [FALSE] PROCEDURE, NOPASS :: XYZ => False ----------------------------------^ compilation aborted for 2015-09-07 true.f90 (code 1)
The mention of abstract interface in the error message is odd, as the syntax does not permit the name of an abstract interface to be used as the procedure name in a type bound procedure statement.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the report and convenient reproducer. I reported it to Development and will keep you updated.
(Internal tracking id: DPD200375834)
(Resolution Update on 05/26/2016): This defect is fixed in the Intel® Parallel Studio XE 2016 Update 3 Release (ifort Version 16.0.3.207 Build 20160415 - PSXE 2016.3.059 / CnL 2016.3.207- Windows)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I confirmed this defect is fixed in the Intel® Parallel Studio XE 2016 Update 3 release available from the Intel® Software Development Products Registration Center (IRC). Thank you for reporting this defect.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page