- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code is invalidly rejected by ifort:
module m
implicit none
interface operator (.timestimestimestimestimestimestimes.)
module procedure f
end interface
contains
real function f (x, y)
real, intent(in) :: x, y
f = x*y
end function
end module
Compiling:
% ifort -V ifort-uop.f90
Intel(R) Fortran Intel(R) 64 Compiler Classic for applications running on Intel(R) 64, Version 2021.1.2 Build 20201208_000000
Copyright (C) 1985-2020 Intel Corporation. All rights reserved.
Intel(R) Fortran 2021.1.2-2085
ifort-uop.f90(3): error #6018: A defined op has more than 31 characters. [TIMESTIMESTIMESTIMESTIMESTIMESTIMES]
interface operator (.timestimestimestimestimestimestimes.)
------------^
compilation aborted for ifort-uop.f90 (code 1)
I couldn't find the location in the standard where it states a number for the length of the name of a defined operator, but I think it should be the same as for other symbols (63). This is what other compilers accept.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's an oversight. The standard says:
C1004 (R1003) A defined-unary-op shall not contain more than 63 letters and shall not be the same as any intrinsic-operator or logical-literal-constant.
If you can, report it through the Online Service Center, or hope that an Intel support engineer picks it up from here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah yes, now I see it, too:
C1005 (R1023) A defined-binary-op shall not contain more than 63 letters and shall not be the same as any intrinsic-operator or logical-literal-constant.
It appears that someone already picked up the report, but thanks for mentioning it.

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