- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following invalid code shows that a certain invalid code is not diagnized:
function f1()
character(1) :: f1
character(:), allocatable :: g1
f1 = 'f'
return
entry g1()
g1 = 'g'
end
function f2()
character(1) :: f2
character(1), allocatable :: g2
f2 = 'f'
return
entry g2()
g2 = 'g'
end
function f3()
character(1) :: f3
character(1), pointer :: g3
f3 = 'f'
return
entry g3()
g3 = 'g'
end
% ifort ifort-entry-mismatch.f90
ifort-entry-mismatch.f90(6): error #6625: The character lengths of the functions must not be different. [G1]
entry g1()
------^
ifort-entry-mismatch.f90(24): error #7127: The characteristics of the function named on the ENTRY statement are different from the characteristics of the result of the function named on the FUNCTION statement. [G3]
entry g3()
------^
compilation aborted for ifort-entry-mismatch.f90 (code 1)
Case 2 with function f2/entry g2 should be rejected, too, according to F2018, 15.6.2.6
ENTRY statement, paragraph 3. The characteristics do not match, as in the last case of the example.
Thanks,
Harald
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I filed a bug report on your behalf, CMPLRIL0-34166. I'll let you know when it is fixed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The fix will be available in the next oneAPI release.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page