Skip to content

[flang] Inquiry on the KIND of a kind parameter of derived type failed #161538

@DanielCChen

Description

@DanielCChen

Consider the following code:

type :: dt(k)
  integer(8), kind :: k
end type
type(dt(4))  :: d1
print*, d1%k%kind
end

Flang failed to compile the code above with

t.f:5:12: error: 'k' is not an object and may not be used as the base of a component reference or type parameter inquiry
  print*, d1%k%kind
             ^

All ifort, gfortran and XLF compile and run the code successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    flang:frontendquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions