Commit 1af73491 by Paul Thomas

re PR fortran/84088 ([nvptx] libgomp.oacc-fortran/declare-*.f90 execution fails)

2018-01-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84088
	* trans-expr.c (gfc_conv_procedure_call): If the parm expr is
	an address expression passed to an assumed rank dummy, convert
	to an indirect reference.

2018-01-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/84088
	* gfortran.dg/pr84088.f90 : New test.

From-SVN: r257262
parent 125a677d
2018-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84088
* trans-expr.c (gfc_conv_procedure_call): If the parm expr is
an address expression passed to an assumed rank dummy, convert
to an indirect reference.
2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org> 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
* dump-parse-tree.c (write_proc): Use sym_name (which may * dump-parse-tree.c (write_proc): Use sym_name (which may
......
...@@ -5325,10 +5325,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, ...@@ -5325,10 +5325,8 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
&& fsym->ts.type != BT_CLASS && e->expr_type != EXPR_NULL) && fsym->ts.type != BT_CLASS && e->expr_type != EXPR_NULL)
{ {
tmp = parmse.expr; tmp = parmse.expr;
if (TREE_CODE (tmp) == ADDR_EXPR if (TREE_CODE (tmp) == ADDR_EXPR)
&& (POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (tmp, 0))) tmp = build_fold_indirect_ref_loc (input_location, tmp);
|| e->expr_type == EXPR_CONSTANT))
tmp = TREE_OPERAND (tmp, 0);
parmse.expr = gfc_conv_scalar_to_descriptor (&parmse, tmp, parmse.expr = gfc_conv_scalar_to_descriptor (&parmse, tmp,
fsym->attr); fsym->attr);
parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr = gfc_build_addr_expr (NULL_TREE,
......
2018-01-31 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84088
* gfortran.dg/pr84088.f90 : New test.
2018-01-31 Vladimir Makarov <vmakarov@redhat.com> 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
PR target/82444 PR target/82444
......
! { dg-do run }
!
! Test of fix for case in comment #7 of PR84088.
!
! Contributed by Tom de Vries <vries@gcc.gnu.org>
!
implicit none
integer(kind=4) z
call foo (z)
contains
subroutine foo (a)
type (*), dimension (..), contiguous :: a
integer(kind = 4) :: i
if(sizeof (a) .ne. sizeof (i)) call abort
end subroutine foo
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