Hello everyone,
a one-line-fix for one of the test cases in pr69498. The refs count of
the ppr@ symbol wasn't set properly. Attached are the patch & the test case.
If I understand the 'Write Access' page correctly, this would be the
kind of patch I would not have to bother the mailing list with but
instead could commit directly? Would this count as an "obvious fix"?
Nicolas
Regression tested for x86_64-pc-linux-gnu.
2017-03-18 Nicolas Koenig <koeni...@student.ethz.ch>
PR fortran/69498
* decl.c (add_hidden_procptr_result): Fixed Refs count
of the created "ppr@" symbol.
2017-03-18 Nicolas Koenig <koeni...@student.ethz.ch>
PR fortran/69498
* gfortran.dg/unexp_attribute.f90: New test
! { dg-do compile }
! This test used to result in an internal compiler error
function f()
interface
external f ! { dg-error "Unexpected attribute declaration statement in INTERFACE" }
end interface
end function
Index: decl.c
===================================================================
--- decl.c (revision 246260)
+++ decl.c (working copy)
@@ -5430,6 +5430,7 @@ add_hidden_procptr_result (gfc_symbol *sym)
gfc_get_sym_tree ("ppr@", gfc_current_ns->parent, &stree, false);
st2 = gfc_new_symtree (&gfc_current_ns->sym_root, "ppr@");
st2->n.sym = stree->n.sym;
+ stree->n.sym->refs++;
}
sym->result = stree->n.sym;