From c51ecf2813baeab6e24a2474d6c097d047ad41a2 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sun, 26 May 2019 14:02:51 +0000 Subject: [PATCH] re PR fortran/90539 (481.wrf slowdown by 25% on Intel Kaby with -Ofast -march=native starting with r271377) 2019-05-26 Thomas Koenig PR fortran/90539 * trans-types.c (get_formal_from_actual_arglist): Set rank and lower bound for assumed size arguments. From-SVN: r271630 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/trans-types.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c3240f44e8d..679633d616d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2019-05-26 Thomas Koenig + + PR fortran/90539 + * trans-types.c (get_formal_from_actual_arglist): Set rank + and lower bound for assumed size arguments. + 2019-05-22 Andrew Stubbs * trans-stmt.c (gfc_trans_critical): Use size_type_node for diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 22410b551e6..e16de59f666 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -3010,6 +3010,10 @@ get_formal_from_actual_arglist (gfc_symbol *sym, gfc_actual_arglist *actual_args { s->attr.dimension = 1; s->as = gfc_get_array_spec (); + s->as->rank = 1; + s->as->lower[0] = gfc_get_int_expr (gfc_index_integer_kind, + &a->expr->where, 1); + s->as->upper[0] = NULL; s->as->type = AS_ASSUMED_SIZE; } } -- 2.30.2