Commit 7dc3df08 by Thomas Koenig

re PR fortran/59345 (_gfortran_internal_pack on compiler generated temps)

2019-01-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/59345
	* trans-array.c (gfc_conv_parameter_array):  Temporary
	arrays generated for expressions do not need to be repacked.

2019-01-11  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/59345
	* gfortran.dg/internal_pack_16.f90: New test.

From-SVN: r267829
parent 0604d567
2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59345
* trans-array.c (gfc_conv_parameter_array): Temporary
arrays generated for expressions do not need to be repacked.
2019-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86322
......
......@@ -7866,6 +7866,12 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77,
no_pack = contiguous && no_pack;
/* If we have an expression, an array temporary will be
generated which does not need to be packed / unpacked
if passed to an explicit-shape dummy array. */
no_pack = no_pack || (g77 && expr->expr_type == EXPR_OP);
/* Array constructors are always contiguous and do not need packing. */
array_constructor = g77 && !this_array_result && expr->expr_type == EXPR_ARRAY;
......
2019-01-11 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/59345
* gfortran.dg/internal_pack_16.f90: New test.
2019-01-10 Jakub Jelinek <jakub@redhat.com>
PR target/88785
......
! { dg-do compile }
! { dg-additional-options "-fdump-tree-original" }
! PR 59345 - pack/unpack was not needed here.
SUBROUTINE S1(A)
REAL :: A(3)
CALL S2(-A)
END SUBROUTINE
! { dg-final { scan-tree-dump-not "_gfortran_internal_pack" "original" } }
! { dg-final { scan-tree-dump-not "_gfortran_internal_unpack" "original" } }
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