Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29429 ディスカッション

minor bug with parameterized derived type

BaptisteMARY
ビギナー
769件の閲覧回数

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 件の賞賛
1 解決策
JohnNichols
高評価コントリビューター III
754件の閲覧回数

There is no error in the latest VS 2022 with the latest OneAPI in IFX using a stock standard Fortran outline.  

It just compiles and runs, suggest update. 

元の投稿で解決策を見る

2 返答(返信)
JohnNichols
高評価コントリビューター III
755件の閲覧回数

There is no error in the latest VS 2022 with the latest OneAPI in IFX using a stock standard Fortran outline.  

It just compiles and runs, suggest update. 

BaptisteMARY
ビギナー
162件の閲覧回数

Exact !

With version 2025.3.1, this bug is already corrected.

 

 

返信