Skip to content

[Flang] CrayPointer: Incorrect error message when the argument of a statement function is also a CrayPointer pointee #93484

@DanielCChen

Description

@DanielCChen

Consider the following test case:

      INTEGER*1   I1ARG1, SF, SF_RETURN, pointee

      POINTER (I1ARG1P,I1ARG1)
      SF(I1ARG1) = I1ARG1

      I1ARG1P = loc(pointee)
      I1ARG1 = 10
      SF_RETURN = SF(I1ARG1)
      if (SF_RETURN .ne. 10) error stop 10
      END

Flang currently issues:

t.f:8:22: error: Actual argument type 'INTEGER(1)' is not compatible with dummy argument type 'INTEGER(4)'
        SF_RETURN = SF(I1ARG1)
                       ^^^^^^

It is expected to compile and run successfully (XLF, gfortran and ifort all do).

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