! { dg-do compile }
! PR 67806
! 1. Initialize a variable of derived type with a string component having
!    a length that is the target of the NULL intrinsic.
! 2. Declare a derived type with a string component having a length that is
!    the target of the NULL intrinsic with an integer mold argument.
subroutine s1
   type t
      character(null()) :: c ! { dg-error "is target of NULL pointer" }
   end type
   type(t) :: x = t('a')
end subroutine

subroutine s2
   integer, pointer :: n
   type t
      character(null(n)) :: c ! { dg-error "is target of NULL pointer" }
   end type
end subroutine
