re PR fortran/45456 ([OOP] Bogus pointer initialization error on pointer-valued TBP)
2010-08-30 Janus Weil <janus@gcc.gnu.org> PR fortran/45456 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs. 2010-08-30 Janus Weil <janus@gcc.gnu.org> PR fortran/45456 * gfortran.dg/typebound_proc_18.f03: New. From-SVN: r163661
This commit is contained in:
parent
d3c1230697
commit
e8cd398346
@ -1,3 +1,8 @@
|
||||
2010-08-30 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/45456
|
||||
* resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
|
||||
|
||||
2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
|
||||
|
||||
* Make-lang.in: Add frontend-passes.o dependencies.
|
||||
|
@ -1083,7 +1083,8 @@ resolve_structure_cons (gfc_expr *expr, int init)
|
||||
comp->name);
|
||||
}
|
||||
|
||||
if (!comp->attr.pointer || cons->expr->expr_type == EXPR_NULL)
|
||||
if (!comp->attr.pointer || comp->attr.proc_pointer
|
||||
|| cons->expr->expr_type == EXPR_NULL)
|
||||
continue;
|
||||
|
||||
a = gfc_expr_attr (cons->expr);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-08-30 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/45456
|
||||
* gfortran.dg/typebound_proc_18.f03: New.
|
||||
|
||||
2010-08-30 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
|
||||
|
29
gcc/testsuite/gfortran.dg/typebound_proc_18.f03
Normal file
29
gcc/testsuite/gfortran.dg/typebound_proc_18.f03
Normal file
@ -0,0 +1,29 @@
|
||||
! { dg-do compile }
|
||||
!
|
||||
! PR 45456: [4.6 Regression] [OOP] Bogus pointer initialization error on pointer-valued TBP
|
||||
!
|
||||
! Contributed by Andrew Benson <abenson@its.caltech.edu>
|
||||
|
||||
module Merger_Trees
|
||||
private
|
||||
public :: mergerTree
|
||||
|
||||
type mergerTree
|
||||
contains
|
||||
procedure :: getNode => Tree_Node_Get
|
||||
end type mergerTree
|
||||
|
||||
contains
|
||||
|
||||
function Tree_Node_Get(thisTree,nodeIndex) result(foundNode)
|
||||
implicit none
|
||||
class(mergerTree), intent(inout) :: thisTree
|
||||
integer, intent(in) :: nodeIndex
|
||||
integer, pointer :: foundNode
|
||||
|
||||
return
|
||||
end function Tree_Node_Get
|
||||
|
||||
end module Merger_Trees
|
||||
|
||||
! { dg-final { cleanup-modules "Merger_Trees" } }
|
Loading…
x
Reference in New Issue
Block a user