aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/match.c1
-rw-r--r--gcc/fortran/resolve.c1
3 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index f235ab2..346592e 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,10 @@
+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.
+
2016-11-06 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/78226
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 40566f6..5a7451e 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -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;
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 7725371..f4b1283 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -8857,6 +8857,7 @@ resolve_select_type (gfc_code *code, gfc_namespace *old_ns)
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);