Fix fortran/65894 elemental procedures wrong-code
authorMikael Morin <mikael@gcc.gnu.org>
Sat, 9 May 2015 13:36:14 +0000 (13:36 +0000)
committerMikael Morin <mikael@gcc.gnu.org>
Sat, 9 May 2015 13:36:14 +0000 (13:36 +0000)
commit14aeb3cd27717e1dd11ad5044e738a350e7d946b
treefff70f7f0c28192df8e62ca16e07ccec8557141d
parent1f0e2688af26e66efa9db498d6db01760832fee3
Fix fortran/65894 elemental procedures wrong-code

gcc/fortran/
2015-05-09  Mikael Morin  <mikael@gcc.gnu.org>

PR fortran/65894
* trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
New prototype.
* trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
New function.
(gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
as conditional.
(gfc_walk_elemental_function_args): Set the dummy_arg field.
* trans.h (gfc_ss_info): New subfield dummy_arg.
* trans-expr.c (gfc_conv_procedure_call): Revert the change
of revision 222361.
(gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
as conditional.

gcc/testsuite/
2015-05-09  Andre Vehreschild  <vehre@gmx.de>

PR fortran/65894
* gfortran.dg/elemental_subroutine_11.f90: New test.

From-SVN: r222968
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-array.h
gcc/fortran/trans-expr.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/elemental_subroutine_11.f90 [new file with mode: 0644]