Skip to content

[Flang] %REF: Incorrect diagnostic. #93489

Closed
@DanielCChen

Description

@DanielCChen

Consider the following code:

      interface
         subroutine sub(ctx)
            integer :: ctx
         end
      end interface

   integer, parameter :: ret = 5

   call sub(%ref(ret))

  end

Flang currently issues an error as:

9:18: error: Assignment to constant 'ret' is not allowed
   call sub(%ref(ret))
                 ^^^

XLF, gfortran and ifort all accept the above syntax.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorflang:frontend

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions