diff mbox series

[fortran,committed] Set rank and lower bound for assumed size arguments

Message ID ba3a6e88-b333-caeb-b2e7-60142c80f2b3@netcologne.de
State New
Headers show
Series [fortran,committed] Set rank and lower bound for assumed size arguments | expand

Commit Message

Thomas Koenig May 26, 2019, 2:04 p.m. UTC
Hello world,

in the absence of a test case for PR 90539, I'm taking a shotgun
approach: Fix something that appears strange in the debug logs
and see if this more or less accidentally fixes the problem.
If not, at least there is one fewer point to look at.

I have committed the attached patch as obvious and simple,
r271630.

Regards

	Thomas

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.
diff mbox series

Patch

Index: trans-types.c
===================================================================
--- trans-types.c	(Revision 271376)
+++ trans-types.c	(Arbeitskopie)
@@ -3010,6 +3010,10 @@  get_formal_from_actual_arglist (gfc_symbol *sym, g
 		{
 		  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;
 		}
 	    }