https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117070
anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-03-18
                 CC|                            |anlauf at gcc dot gnu.org
           Priority|P3                          |P4
             Status|UNCONFIRMED                 |WAITING

--- Comment #2 from anlauf at gcc dot gnu.org ---
(In reply to Ivan Pribec from comment #1)
> This is supposed to work already with the F2008 standard:
> 
> > nagfor -f2008 dispatch_test.f90 
> NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7203
> Evaluation trial version of NAG Fortran Compiler Release 7.2(Shin-Urayasu)
> Build 7203
> [NAG Fortran Compiler normal termination]
> > ./a.out
>  PASS

Hmmm.

type(pc), parameter :: table(3) = [pc(a),pc(b),pc(c)]  ! Doesn't work

We need to understand if this is legal.

8.5.13 PARAMETER attribute

"The PARAMETER attribute specifies that an entity is a named constant. The
 entity has the value specified by its constant-expr, ..."

C1012 (R1030) constant-expr shall be a constant expression.

10.1.12 Constant expression

"A constant expression is an expression with limitations that make it
 suitable for use as a kind type parameter, initializer, or named constant.
 It is an expression in which each operation is intrinsic, and each primary
 is"

...

(7) a reference to an elemental standard intrinsic function, ...

(8) a reference to a standard intrinsic function that is transformational, ...

(9) a reference to the intrinsic function NULL ...

(10) a reference to the intrinsic function TRANSFER ...

(11) a reference to a transformational function from the intrinsic module ...

...

I do not see any mentioning of a user-defined function being mentioned in
this list, so it might be that NAG should not accept the code.

Intel also rejects the code.

Can you ask Steve Lionel at the Intel forum what he thinks?

Reply via email to