- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Ifx -stand f23 gives 3 error messages for this program, but the type parameter inquiry x%kind and aimag(z) in a constant expression both became valid Fortran in 2003; the complex part designator x%im became valid Fortran in 2008. F2023 5.4.3.2.4 implies that a subobject need not be a variable. The program and its compile-time messages:
```
program imconsts
implicit none ! file imconsts.f90
complex,parameter :: z = (5,7)/9.0
integer,parameter :: zk = z%kind
real ,parameter :: zi1 = aimag(z), zi2 = z%im
print "(I0,2F10.7)", zk, zi1, zi2
end program imconsts
(lf) john:~$ intel/oneapi/compiler/2025.1/bin/ifx -stand f23 imconsts.f90
imconsts.f90(4): error #7747: Invalid parameter expression. [Z]
integer,parameter :: zk = z%kind
-----------------------------^
imconsts.f90(5): warning #6009: Fortran 2023 specifies that an elemental intrinsic function here be of type integer or character and each argument must be an initialization expr of type integer or character. [AIMAG]
real ,parameter :: zi1 = aimag(z), zi2 = z%im
-----------------------------^
imconsts.f90(5): error #7747: Invalid parameter expression. [Z]
real ,parameter :: zi1 = aimag(z), zi2 = z%im
---------------------------------------------^
compilation aborted for imconsts.f90 (code 1)
```
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
There have been numerous IFX bugs reported relating to constant expressions to define a parameter. Do a forum search yours might be a repeat.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The only repeat I found is that the %kind bug was said to have been fixed in ifx 2025.0 but it's back again in 2025.1. See @sblionel's bug report and the reply in these screenshots:
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Hi,
We also found that ifx does not support for the initialization of the derived type in the declaration section and started triaging it with development team.
Thanks.

- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite