Commit 9b63dcab by Janus Weil

re PR fortran/51082 ([F03] Wrong result for a pointer to a proc-pointer component)

2012-04-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/51082
	* trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
	simple function call (or a more involved PPC reference).


2012-04-15  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/51082
	* gfortran.dg/proc_ptr_comp_34.f90: New test case.

From-SVN: r186465
parent cdd244b8
2012-04-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/51082
* trans-expr.c (gfc_conv_expr_reference): Check if the expression is a
simple function call (or a more involved PPC reference).
2012-04-15 Tobias Burnus <burnus@net-b.de>
PR fortran/52916
......
......@@ -5650,7 +5650,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr)
&& ((expr->value.function.esym
&& expr->value.function.esym->result->attr.pointer
&& !expr->value.function.esym->result->attr.dimension)
|| (!expr->value.function.esym
|| (!expr->value.function.esym && !expr->ref
&& expr->symtree->n.sym->attr.pointer
&& !expr->symtree->n.sym->attr.dimension)))
{
......
2012-04-15 Janus Weil <janus@gcc.gnu.org>
PR fortran/51082
* gfortran.dg/proc_ptr_comp_34.f90: New test case.
2012-04-14 Tobias Burnus <burnus@net-b.de>
PR fortran/52916
......
! { dg-do run }
!
! PR 51082: [F03] Wrong result for a pointer to a proc-pointer component
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
program ala
implicit none
type process_list
procedure(ala1), pointer, nopass :: process
end type
type(process_list), target :: p_list
type(process_list), pointer :: p
p_list%process => ala1
p => p_list
write(*,*) p_list%process(1.0)
write(*,*) p%process(1.0) !!!! failed
contains
real function ala1(x)
real, intent(in) :: x
ala1 = x
end function
end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment