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

procedure(assign) leads to strange error message

Arjen_Markus
Honored Contributor II
761 Views

Hello,

I noticed that using a line like "procedure(assign), deferred:: assign_data" leads to an
error message that bears little or no relevance to the statement:

sort_syntax_error.f90(11): error #5082: Syntax error, found 'ASSIGN' when expecting one of: ) TYPE BYTE CHARACTER CLASS DOUBLE DOUBLECOMPLEX DOUBLEPRECISION INTEGER LOGICAL ...

procedure(assign), deferred :: assign_data

------------------^

I f I change the name "assign" to something else, the message disappears.

This happens with Intel Fortran 11 on Windows but also with version 12.0.3 on Linux, so I guess
it is a front-end problem.

Here is a small program to reproduce it:

! abstract_sort.f90 --

! Show how to define a generic sortable type

!

! Module for sortable objects

!

module sortable_types

type, abstract :: sortable

! No particular data

contains

procedure(assign), deferred :: assign_data

end type sortable

end module sortable_types


Regards,

Arjen

0 Kudos
4 Replies
Steven_L_Intel1
Employee
761 Views
Amusing. I'll let the developers know. Even without that, this code needs ASSIGN to have an explicit interface visible, but the error remains when I add this. I wonder if there is some remnant of the pre-F77 CALL ASSIGN left in the compiler...
0 Kudos
Arjen_Markus
Honored Contributor II
761 Views
Sure, it is a fragment of a larger program, but I was really surprised to see this one.

IIRC, ASSIGN was a statement, I have seen it once or twice in an actual program, but
I have never actually used it myself.

Regards,

Arjen
0 Kudos
Steven_L_Intel1
Employee
761 Views
Yes, ASSIGN is a statement - part of assigned GOTO and assigned formats. These are "deleted features", but we still support them. Issue ID is DPD200173075.
0 Kudos
Steven_L_Intel1
Employee
761 Views

This was fixed in the 13.0 compiler.

0 Kudos
Reply