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

minor bug with parameterized d

dondon123
Novice
590 Views

The following code returns an error 8237 on ifx 2025.1

 

program param_types

  type mytype(char_len)
    integer, len :: char_len = 80
    character(len=char_len) :: char1
    character(len=char_len) :: char2, char3
  end type

end program param_types

 

error #8237: The character length in a component declaration shall either be a colon, be an initialization expression, or be a specification expression. [CHAR3]
character(len=char_len) :: char2, char3
------------------------------------^

 

I don’t think this is bad usage. Is it ?

It should be allowed to chain variables declaration on a single line.

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
466 Views

I can confirm that 2025.3.2 doesn't have this error.

View solution in original post

0 Kudos
2 Replies
yzh_intel
Moderator
557 Views

Hi, This issue has been reported before on the Fortran forum and has been fixed with the latest ifx compiler. Please double check. 

0 Kudos
Steve_Lionel
Honored Contributor III
467 Views

I can confirm that 2025.3.2 doesn't have this error.

0 Kudos
Reply