aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2019-01-13 14:57:39 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2019-01-13 14:57:39 +0000
commit8ef8fa9a4de095b17647b65b22081413d6afd171 (patch)
tree1cc2fe21c165c2700c15ca13240553c5f4dd3f00 /gcc/fortran/trans-array.c
parent234c38181acfb1e3980bd4a6974328d097b922f1 (diff)
downloadgcc-8ef8fa9a4de095b17647b65b22081413d6afd171.zip
gcc-8ef8fa9a4de095b17647b65b22081413d6afd171.tar.gz
gcc-8ef8fa9a4de095b17647b65b22081413d6afd171.tar.bz2
re PR fortran/57992 (Pointless packing of contiguous arrays for simply contiguous functions results as actual arguments)
2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/57992 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack functions with contiguous results. 2019-01-13 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/59345 * gfortran.dg/internal_pack_18.f90: New test. From-SVN: r267905
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index ae597e8..1814916 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -7894,7 +7894,9 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, bool g77,
{
gfc_symbol *result = expr->value.function.esym->result;
if (result->attr.dimension
- && (result->as->type == AS_EXPLICIT || result->attr.allocatable))
+ && (result->as->type == AS_EXPLICIT
+ || result->attr.allocatable
+ || result->attr.contiguous))
no_pack = 1;
}
}