mecej4
Joined: 31 Oct 2006 Posts: 1897
|
Posted: Sat Jan 06, 2024 9:10 pm Post subject: Error in initialization using array constructors |
|
|
The following test program
Code: | program ibug
integer, PARAMETER :: INTPAT(0:7) = ichar(achar([128,64,32,16,8,4,2,1]))
character(1), PARAMETER :: CHARPAT(0:7) = achar([128,64,32,16,8,4,2,1])
print '(8Z3.2)', INTPAT, ichar(CHARPAT)
end program |
should (and does, with Gfortran and Intel) output
Code: | 80 40 20 10 08 04 02 01
80 40 20 10 08 04 02 01 |
but with FTN95 I get
Code: | 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 |
|
|