Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Variable named 'byte'

gib
New Contributor II
583 Views
I encountered an error using ifort 11.0.066 to compile some code that Paul van Delst says used to compile OK with version 10. Here is a simple example:

program test_byte
IMPLICIT NONE

INTEGER, PARAMETER :: byte = 123

! INTEGER, PARAMETER :: itype = byte
INTEGER, PARAMETER :: itypes(1) = (/ byte /)

end program

The syntax error #5082 occurs at the line defining itypes(1). The code with that line commented and the previous line uncommented compiles without error.
0 Kudos
3 Replies
Steven_L_Intel1
Employee
583 Views
I agree that this is a bug. I'll report it to the developers. Thanks for letting us know.
0 Kudos
Steven_L_Intel1
Employee
583 Views
Reported as issue DPD200111543. A workaround is to use the F2003 syntax [BYTE] for the array constructor.
0 Kudos
gib
New Contributor II
583 Views
Reported as issue DPD200111543. A workaround is to use the F2003 syntax [BYTE] for the array constructor.
Thanks Steve. This wasn't at all an important issue for me, but I thought it was one that Intel might like to know about.
0 Kudos
Reply