Skip to content
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

[Issue]: [Fortran] aomp flang complains about incompatible interfaces if a deferred procedure of an abstract type contains pointer dummy variables #1225

Open
tillense opened this issue Jan 21, 2025 · 1 comment

Comments

@tillense
Copy link

Problem Description

Hi, I'm currently testing the rocm / aomp compiler with my fortran code and probably found a bug in the parser. If you try to compile the example below with flang, compilation aborts with the messageF90-S-0155-Interface is not compatible with parent's interface for type bound procedure init_ext (mods.f90: 37). This happens with flang included with aomp 20.0.0 as well as that coming with rocm 6.3.1. If one removes the pointer attribute it works and also if one comments out line 16.

module base_mod

  type, abstract :: base
  contains
    procedure (init_all), deferred, pass(this) :: init
  end type base

  abstract interface
    subroutine init_all(this,x)
      import base
      class(base)   :: this
      real, pointer :: x
    end subroutine init_all
  end interface

contains

end module base_mod

module ext_mod
  use base_mod

  type, extends(base) :: ext
    real, pointer :: x
  contains
    procedure :: init => init_ext
  end type ext

contains

  subroutine init_ext(this,x)
    implicit none
    class(ext)    :: this
    real, pointer :: x
  end subroutine init_ext

end module ext_mod

Operating System

Ubuntu 24.04

CPU

AMD Ryzen 7 PRO 3700U

GPU

AMD Radeon Vega Mobile Gfx

ROCm Version

ROCm 6.3.0

ROCm Component

aomp

Steps to Reproduce

No response

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@ppanchad-amd
Copy link

Hi @tillense. Internal ticket has been created to investigate your issue. Thanks!

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

No branches or pull requests

2 participants