diff options
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index e71e76e..af3a2d8 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -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; |