diff mbox

[fortran,committed] Fill in some more locations

Message ID dbd54e32-d508-a021-2d9b-3308c5636eb3@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig Nov. 7, 2016, 3:25 p.m. UTC
Hello world,

I have committed the little patchlet below as obvious, after
regression-testing.

Regards

	Thomas

2016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/78826
         * match.c (gfc_match_select_type):  Add where for expr1.
         * resolve.c (resolev_select_type): Add where for expr1 of new
         statement.

Comments

Thomas Koenig Nov. 7, 2016, 3:28 p.m. UTC | #1
Am 07.11.2016 um 16:25 schrieb Thomas Koenig:

>         PR fortran/78826

... should have been PR 78226.
diff mbox

Patch

Index: match.c
===================================================================
--- match.c	(Revision 241887)
+++ match.c	(Arbeitskopie)
@@ -5898,6 +5898,7 @@  gfc_match_select_type (void)
     {
       expr1 = gfc_get_expr ();
       expr1->expr_type = EXPR_VARIABLE;
+      expr1->where = expr2->where;
       if (gfc_get_sym_tree (name, NULL, &expr1->symtree, false))
 	{
 	  m = MATCH_ERROR;
Index: resolve.c
===================================================================
--- resolve.c	(Revision 241887)
+++ resolve.c	(Arbeitskopie)
@@ -8857,6 +8857,7 @@  resolve_select_type (gfc_code *code, gfc_namespace
 	  new_st->expr1->value.function.actual = gfc_get_actual_arglist ();
 	  new_st->expr1->value.function.actual->expr = gfc_get_variable_expr (selector_expr->symtree);
 	  new_st->expr1->value.function.actual->expr->where = code->loc;
+	  new_st->expr1->where = code->loc;
 	  gfc_add_vptr_component (new_st->expr1->value.function.actual->expr);
 	  vtab = gfc_find_derived_vtab (body->ext.block.case_list->ts.u.derived);
 	  st = gfc_find_symtree (vtab->ns->sym_root, vtab->name);