public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch, fortran, committed] Set rank and lower bound for assumed size arguments
@ 2019-05-26 15:24 Thomas Koenig
  0 siblings, 0 replies; only message in thread
From: Thomas Koenig @ 2019-05-26 15:24 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

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.

[-- Attachment #2: p1.diff --]
[-- Type: text/x-patch, Size: 500 bytes --]

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;
 		}
 	    }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-05-26 14:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-26 15:24 [patch, fortran, committed] Set rank and lower bound for assumed size arguments Thomas Koenig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).