[fortran,committed] Fix PR 91643, repacking of assumed rank argument
diff mbox series

Message ID 9b434d04-8c88-07dd-a2ff-ef839947136f@netcologne.de
State New
Headers show
Series
  • [fortran,committed] Fix PR 91643, repacking of assumed rank argument
Related show

Commit Message

Thomas Koenig Dec. 10, 2019, 10 p.m. UTC
Hello world,

this fixes a regression introduced by my inline repacking patch.
With the test case, it is simple and obvious enough - do not repack
an assumed rank argument (which makes no sense).

Committed as obvious and simple as r279203 after regression-testing.


2019-12-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/91643
	* trans-array.c (gfc_conv_array_parameter): Do not repack
	an assume dummy argument.

2019-12-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/91643
	* gfortran.dg/assumed_rank_18.f90: New test.

Patch
diff mbox series

Index: trans-array.c
===================================================================
--- trans-array.c	(Revision 279064)
+++ trans-array.c	(Arbeitskopie)
@@ -8141,6 +8141,8 @@  gfc_conv_array_parameter (gfc_se * se, gfc_expr *
 
       if (g77 && optimize && !optimize_size && expr->expr_type == EXPR_VARIABLE
 	  && !is_pointer (expr) && ! gfc_has_dimen_vector_ref (expr)
+	  && !(expr->symtree->n.sym->as
+	       && expr->symtree->n.sym->as->type == AS_ASSUMED_RANK)
 	  && (fsym == NULL || fsym->ts.type != BT_ASSUMED))
 	{
 	  gfc_conv_subref_array_arg (se, expr, g77,