Commit dd9315de by Daniel Kraft Committed by Daniel Kraft

resolve.c (resolve_elemental_actual): Handle calls to intrinsic subroutines correctly.

2008-10-16  Daniel Kraft  <d@domob.eu>

	* resolve.c (resolve_elemental_actual): Handle calls to intrinsic
	subroutines correctly.

2008-10-16  Daniel Kraft  <d@domob.eu>

	* gfortran.dg/elemental_intrinsic_1.f03: New test.

From-SVN: r141175
parent 919e5c5e
2008-10-16 Daniel Kraft <d@domob.eu>
* resolve.c (resolve_elemental_actual): Handle calls to intrinsic
subroutines correctly.
2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals. * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
......
...@@ -1352,10 +1352,18 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c) ...@@ -1352,10 +1352,18 @@ resolve_elemental_actual (gfc_expr *expr, gfc_code *c)
else else
return SUCCESS; return SUCCESS;
} }
else if (c && c->ext.actual != NULL && c->symtree->n.sym->attr.elemental) else if (c && c->ext.actual != NULL)
{ {
arg0 = c->ext.actual; arg0 = c->ext.actual;
esym = c->symtree->n.sym;
if (c->resolved_sym)
esym = c->resolved_sym;
else
esym = c->symtree->n.sym;
gcc_assert (esym);
if (!esym->attr.elemental)
return SUCCESS;
} }
else else
return SUCCESS; return SUCCESS;
......
2008-10-16 Daniel Kraft <d@domob.eu>
* gfortran.dg/elemental_intrinsic_1.f03: New test.
2008-10-16 Jakub Jelinek <jakub@redhat.com> 2008-10-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/37664 PR tree-optimization/37664
......
! { dg-do compile }
! Conformance-checking of arguments was not done for intrinsic elemental
! subroutines, check this works now.
! This is the test from PR fortran/35681, comment #1 (second program).
integer, dimension(10) :: ILA1 = (/1,2,3,4,5,6,7,8,9,10/)
call mvbits ((ILA1((/9/))), 2, 4, ILA1, 3) ! { dg-error "Different shape" }
write (*,'(10(I3))') ila1
end
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