- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following source contains a spurious '&' in the middle of the ninth line. According to the Fortran standard, in free form source a '&' that is not inside a character string must be followed by an end of line or a comment. The Intel Fortran compiler on Windows, 19.1U1, does not recognize this error, and produces an object file!
Program PassString2C use, intrinsic :: iso_c_binding, only: c_char, c_null_char interface subroutine copy(in, out) bind(c, name = 'copy') import c_char character(kind=c_char), dimension(*) :: in, out end subroutine copy end interface character(len=10, kind=c_char) :: & digit_string = & ! First '&' is a typo c_char_'123456789' // c_null_char character(kind=c_char) :: digit_arr(10) call copy(digit_string, digit_arr) print '(1x, 9a1)', digit_arr(1:9) end Program
I created a support ticket (04579584) two days ago. Today I was told that I was not eligible for support and that I should report the bug in this forum.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for posting this. Intel Fortran compiler issues no relevant error or warning with this variant as well:
integer :: & i = 42 end
A support request has been submitted with both the cases: # 04584009.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FortranFan wrote:Thanks for posting this. Intel Fortran compiler issues no relevant error or warning with this variant as well:
integer :: & i = 42 endA support request has been submitted with both the cases: # 04584009.
C:\Temp>type p.f90 integer :: & i = 42 end C:\Temp>gfortran p.f90 p.f90:1:16: 1 | integer :: & i = 42 | 1 Error: Invalid character in name at (1) C:\Temp>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.
Older versions of Ifort have this bug, too.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page