Fortran: Fix intrinsic null() handling [PR99651]
gcc/fortran/ChangeLog: PR fortran/99651 * intrinsic.c (gfc_intrinsic_func_interface): Set attr.proc = PROC_INTRINSIC if FL_PROCEDURE. gcc/testsuite/ChangeLog: PR fortran/99651 * gfortran.dg/null_11.f90: New test.
This commit is contained in:
parent
4493b1c1ad
commit
9d45e848d0
@ -5071,6 +5071,11 @@ got_specific:
|
||||
sym->attr.intrinsic = 1;
|
||||
sym->attr.flavor = FL_PROCEDURE;
|
||||
}
|
||||
if (sym->attr.flavor == FL_PROCEDURE)
|
||||
{
|
||||
sym->attr.function = 1;
|
||||
sym->attr.proc = PROC_INTRINSIC;
|
||||
}
|
||||
|
||||
if (!sym->module)
|
||||
gfc_intrinsic_symbol (sym);
|
||||
|
16
gcc/testsuite/gfortran.dg/null_11.f90
Normal file
16
gcc/testsuite/gfortran.dg/null_11.f90
Normal file
@ -0,0 +1,16 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/99651
|
||||
!
|
||||
module m
|
||||
type :: CHAR_STAR
|
||||
character(len=1),dimension(:),pointer :: ptr
|
||||
end type
|
||||
type(CHAR_STAR), parameter ::CHAR_STAR_NULL = CHAR_STAR(NULL())
|
||||
end module m
|
||||
|
||||
use m
|
||||
type typeNode
|
||||
type(typeNode), pointer :: Next => null()
|
||||
end type typeNode
|
||||
end
|
Loading…
Reference in New Issue
Block a user