- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everyone,
This function compiles with all data types using gfortran. ifort, however, fails if I try to define a behaviour for rank(0). Higher ranks do work, including rank default.
Minimal example:
subroutine sub(c)
character(*), intent(in) :: c(..)
select rank(c)
rank(0)
print*, 0
end select
end subroutine sub
Result:
$ ifort -c ./src/lib.f90 -warn all -check all -error-limit 1 -O0 -g -assume byterecl -traceback -module build/ifort_5C58216731706F11/testingrange -Ibuild/ifort_5C58216731706F11/testingrange -o build/ifort_5C58216731706F11/testingrange/src_lib.f90.o
./src/lib.f90(10): error #5529: CHARACTER variable 'C' has no length argument in routines with C or STDCALL attribute
select rank(c)
------------^
Compiler provided by my company:
ifort (IFORT) 19.1.2.254 20200623
Is this a bug or a feature? At least the error message isn't that clear.
I assume it has something to do with the additional len parameter of the character type. But I'm curious because it does compile and work with gfortran.
Best,
Carl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got the same wrong error message with the current compiler release, 2021.3.0. I filed a bug report, CMPLRIL0-34096, on your behalf. I'll keep you posted on its progress to a fix.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got the same wrong error message with the current compiler release, 2021.3.0. I filed a bug report, CMPLRIL0-34096, on your behalf. I'll keep you posted on its progress to a fix.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for clarifying and for the bug report!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix will be available in the next oneAPI release.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page