diff mbox

[fortran,committed] Fix PR 80162, warning about missing location information

Message ID 9e02af5d-5657-b967-1474-eaeee9ccfb64@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig March 22, 2017, 3:25 p.m. UTC
Hello world,

I have committed the attached patch as obvious and simple
after regression-testing, as rev. 246388.

This is a case where the location checking pass did its job
and found a place where the location information was indeed
missing.

Regards

	Thomas

2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/80142
         * frontend-passes.c (combine_array_constructor): Take
         location of new expression from constructor expression instead
         of constructor.

2017-03-22  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/80142
         * gfortran.dg/any_loc.f90: New test case.
diff mbox

Patch

Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 245760)
+++ frontend-passes.c	(Arbeitskopie)
@@ -1381,7 +1381,7 @@  combine_array_constructor (gfc_expr *e)
       new_expr->ts = e->ts;
       new_expr->expr_type = EXPR_OP;
       new_expr->rank = c->expr->rank;
-      new_expr->where = c->where;
+      new_expr->where = c->expr->where;
       new_expr->value.op.op = e->value.op.op;
 
       if (scalar_first)