mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-22 11:31:05 +08:00
re PR fortran/54134 ([OOP] ICE overriding derived type bound function with allocatable character as result)
2012-07-31 Janus Weil <janus@gcc.gnu.org> PR fortran/54134 * dependency.c (gfc_dep_compare_expr): Check if arguments are NULL. 2012-07-31 Janus Weil <janus@gcc.gnu.org> PR fortran/54134 * gfortran.dg/typebound_override_3.f90: New. From-SVN: r190010
This commit is contained in:
parent
315bdf71bd
commit
8539d639a8
@ -1,3 +1,8 @@
|
||||
2012-07-31 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/54134
|
||||
* dependency.c (gfc_dep_compare_expr): Check if arguments are NULL.
|
||||
|
||||
2012-07-31 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* interface.c (gfc_procedure_use): Return gfc_try instead of void.
|
||||
|
@ -261,6 +261,9 @@ gfc_dep_compare_expr (gfc_expr *e1, gfc_expr *e2)
|
||||
n1 = NULL;
|
||||
n2 = NULL;
|
||||
|
||||
if (e1 == NULL && e2 == NULL)
|
||||
return 0;
|
||||
|
||||
/* Remove any integer conversion functions to larger types. */
|
||||
if (e1->expr_type == EXPR_FUNCTION && e1->value.function.isym
|
||||
&& e1->value.function.isym->id == GFC_ISYM_CONVERSION
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-07-31 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/54134
|
||||
* gfortran.dg/typebound_override_3.f90: New.
|
||||
|
||||
2012-07-31 Bill Schmidt <wschmidt@linux.ibm.com>
|
||||
|
||||
PR tree-optimization/53773
|
||||
|
34
gcc/testsuite/gfortran.dg/typebound_override_3.f90
Normal file
34
gcc/testsuite/gfortran.dg/typebound_override_3.f90
Normal file
@ -0,0 +1,34 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 54134: [OOP] ICE overriding derived type bound function with allocatable character as result
|
||||
!
|
||||
! Contributed by <koen.poppe@cs.kuleuven.be>
|
||||
|
||||
module dtAs
|
||||
implicit none
|
||||
type :: A
|
||||
contains
|
||||
procedure, nopass :: name => name_A
|
||||
end type
|
||||
contains
|
||||
function name_A() result( name )
|
||||
character(:), allocatable :: name
|
||||
name = "name_A"
|
||||
end function
|
||||
end module
|
||||
|
||||
module dtBs
|
||||
use dtAs
|
||||
implicit none
|
||||
type, extends( A ) :: B
|
||||
contains
|
||||
procedure, nopass :: name => name_B
|
||||
end type
|
||||
contains
|
||||
function name_B() result( name )
|
||||
character(:), allocatable :: name
|
||||
name = "name_B"
|
||||
end function
|
||||
end module
|
||||
|
||||
! { dg-final { cleanup-modules "dtAs dtBs" } }
|
Loading…
x
Reference in New Issue
Block a user