Silverfrost Forums

Welcome to our forums

Error in initialization using array constructors

6 Jan 2024 8:10 #30925

The following test program

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

 80 40 20 10 08 04 02 01
 80 40 20 10 08 04 02 01

but with FTN95 I get

 80 80 80 80 80 80 80 80
 80 80 80 80 80 80 80 80
7 Jan 2024 8:51 #30930

mecej4

Thank you for the feedback. I have logged this issue for investigation.

2 Feb 2024 11:13 #31022

This failure has now been fixed for the next release of FTN95.

Please login to reply.