llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[flang][Fortran 2003] unimplemented semantic checks: type bound procedure 3

Open PeixinQiao opened this issue 4 years ago • 4 comments

subroutine s()
  interface
    subroutine real_info()
    end
  end interface
  type mt
   contains
    procedure, nopass :: info => real_info
  end type
  type mt2
    type(mt) :: t1(2)
  end type
  type mt3
    type(mt2) :: t2(2)
  end type
  type mt4
    type(mt3) :: t3(2)
  end type
  type(mt4) :: t(2)

  call sub1(t%t3%t2%t1%info)
end

expected error: Not sure what specifically

Temprorily assign this to myself. Please feel free to take up this when anyone has time to do it. I will say here if I start working on this.

PeixinQiao avatar Jun 02 '22 02:06 PeixinQiao

@llvm/issue-subscribers-flang-frontend

llvmbot avatar Jun 02 '22 02:06 llvmbot

The call call sub1(t%t3%t2%t1%info)

violates

C925 (R918) Exactly one part-ref shall have nonzero rank, and either the final part-ref shall have a section-subscript- list with nonzero rank, another part-ref shall have nonzero rank, or the complex-part-designator shall be an array.

(should be PeixinQiao. Apologize). If you don't mind, I can take a look of this one.

DanielCChen avatar Nov 28 '22 20:11 DanielCChen

@DanielCChen Thanks for working on this. Assigned to you.

PeixinQiao avatar Nov 29 '22 01:11 PeixinQiao

I just realized there is another issue with this code that passing a type bound procedure as an actual argument is not allowed. I opened a new issue #59967 to track it.

DanielCChen avatar Jan 12 '23 16:01 DanielCChen