re PR fortran/90539 (481.wrf slowdown by 25% on Intel Kaby with -Ofast -march=native...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 26 May 2019 14:02:51 +0000 (14:02 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 26 May 2019 14:02:51 +0000 (14:02 +0000)
2019-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>

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
gcc/fortran/trans-types.c

index c3240f4..679633d 100644 (file)
@@ -1,3 +1,9 @@
+2019-05-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       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  <ams@codesourcery.com>
 
        * trans-stmt.c (gfc_trans_critical): Use size_type_node for
index 22410b5..e16de59 100644 (file)
@@ -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;
                }
            }