+2015-10-26 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/66056
+ * fortran.h: Include namespace pointer in statement label
+ structure.
+ * symbol.c (gfc_get_st_label): Store pointer to namespace
+ that owns the statement label tree in each label.
+ (gfc_free_st_label): Use namespace owning statement label
+ tree when deleting statement label.
+ * io.c: Initialize format_asterisk with NULL namespace pointer.
+
2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/36192
tree backend_decl;
locus where;
+
+ gfc_namespace *ns;
}
gfc_st_label;
gfc_st_label
format_asterisk = {0, NULL, NULL, -1, ST_LABEL_FORMAT, ST_LABEL_FORMAT, NULL,
- 0, {NULL, NULL}};
+ 0, {NULL, NULL}, NULL};
typedef struct
{
if (label == NULL)
return;
- gfc_delete_bbt (&gfc_current_ns->st_labels, label, compare_st_labels);
+ gfc_delete_bbt (&label->ns->st_labels, label, compare_st_labels);
if (label->format != NULL)
gfc_free_expr (label->format);
lp->value = labelno;
lp->defined = ST_LABEL_UNKNOWN;
lp->referenced = ST_LABEL_UNKNOWN;
+ lp->ns = ns;
gfc_insert_bbt (&ns->st_labels, lp, compare_st_labels);
+2015-10-26 Louis Krupp <louis.krupp@zoho.com>
+
+ PR fortran/66056
+ * gfortran.dg/empty_label_typedecl.f90: New test.
+
2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/36192
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Werror" }
+subroutine s
+ type t
+ 1 ! { dg-error "empty statement" }
+ end type
+end subroutine
+! { dg-excess-errors "warnings being treated as errors" }