Skip to content

[flang][OpenACC] host_data use_device(obj%comp) on a variable of an extended derived type: nullptr dereference at type.cpp(716) in InstantiateHelper::CreateDerivedTypeSpec #239944

Open

Description

@YuanchengJiang

The following code:

subroutine s(obj)
  type :: t2
    integer :: x
  end type
  type, extends(t2) :: t
    real :: y
  end type
  type(t) :: obj
  !$acc host_data use_device(obj%y)
  !$acc end host_data
end

Resulted in this output:

fatal internal error: nullptr dereference at /root/llvm-project/flang/lib/Semantics/type.cpp(721)

Trunk reproducer (-fsyntax-only -fopenacc): https://godbolt.org/z/8qraW397P

Activity

  1. added
    crashPrefer [crash-on-valid] or [crash-on-invalid]
    generated by fuzzerRegression test generated by fuzzing or AI analysis - not a real world code snippet
    on Nov 7, 2026
  2. llvmorg-github-actions commented on Nov 7, 2026

    @llvmorg-github-actions

    @llvm/issue-subscribers-flang-frontend

    Author: Jiang Yuancheng (YuanchengJiang)

    Details The following code: ```fortran subroutine s(obj) type :: t2 integer :: x end type type, extends(t2) :: t real :: y end type type(t) :: obj !$acc host_data use_device(obj%y) !$acc end host_data end ```

    Resulted in this output:

    fatal internal error: nullptr dereference at /root/llvm-project/flang/lib/Semantics/type.cpp(721)
    

    Trunk reproducer (-fsyntax-only -fopenacc): https://godbolt.org/z/8qraW397P

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    crashPrefer [crash-on-valid] or [crash-on-invalid]flang:frontendgenerated by fuzzerRegression test generated by fuzzing or AI analysis - not a real world code snippet

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions