Skip to content

[flang] Missing diagnostic on missing DEFERRED attribute #138915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanielCChen opened this issue May 7, 2025 · 1 comment · Fixed by #139325
Closed

[flang] Missing diagnostic on missing DEFERRED attribute #138915

DanielCChen opened this issue May 7, 2025 · 1 comment · Fixed by #139325
Assignees

Comments

@DanielCChen
Copy link
Contributor

Consider the following code:

module m1
   type:: base
      integer :: id
   contains
      procedure, nopass :: print1 => printbase
   end type

   type, extends(base), abstract :: child
   contains
      procedure(printif), deferred,  nopass :: print1
   end type

   interface
      subroutine printif()
      end subroutine
   end interface

contains
   subroutine printbase()
      print *,"hello"
   end subroutine
end module

print1 in type child has the DEFERRED attribute but its overridden print1 in type base does not.
This usage should be diagnosed.

@llvmbot
Copy link
Member

llvmbot commented May 7, 2025

@llvm/issue-subscribers-flang-frontend

Author: Daniel Chen (DanielCChen)

Consider the following code: ``` module m1 type:: base integer :: id contains procedure, nopass :: print1 => printbase end type

type, extends(base), abstract :: child
contains
procedure(printif), deferred, nopass :: print1
end type

interface
subroutine printif()
end subroutine
end interface

contains
subroutine printbase()
print *,"hello"
end subroutine
end module


`print1` in type `child` has the `DEFERRED` attribute but its overridden `print1` in type `base` does not.
This usage should be diagnosed.
</details>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants