- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
All,
The ifort (and presumably ifx) parser stumbles upon the identifier CLASSIFY in the following example:
module ifort_bug
type mytype
integer:: value=1
contains
procedure classify
end type mytype
contains
!-------------
subroutine classify(t,iout)
class(mytype),intent(in):: t
integer,intent(out):: iout
iout=t%value
return
end subroutine classify
!-------------
end module ifort_bug
Running version 2021.6.0 as ifort -c bug.f:
bug.f(5): error #5082: Syntax error, found 'IF' when expecting one of: , <END-OF-STATEMENT> ; =>
procedure classify
-----------------^
bug.f(5): error #8169: The specified interface is not declared. [CLASS]
procedure classify
------------^
bug.f(5): error #8169: The specified interface is not declared. [Y]
procedure classify
-------------------^
compilation aborted for bug.f (code 1)
Renaming to KLASSIFY avoids the error, but still, it's a bug.
Thanks,
--Eric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix will be included in the next OneAPI release, which is typically within 3 months. Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Eric,
Yes, it's a bug in the fixed source form parsing. I created your example as a fixed source form file 'repro.f'.
I discovered that if you rename this file from ".f" to ".f90" so the compiler treats it as a free source form there is no issue.
We have had a couple of such fixed source form parsing errors in the past year. I'll write up a bug report. Thanks for sending this to us. My 2 samples attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The test code provided by Ron has reproduced the desired bug. The bug has been reported to the proper channel to proceed further. We will keep posting updates here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix will be included in the next OneAPI release, which is typically within 3 months. Thank you.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page