+2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/89782
+ * io.c (gfc_resolve_dt): Check that internal units are not
+ character PARAMETER.
+
2019-06-21 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/67884
return false;
}
+ if (e->symtree && e->symtree->n.sym->attr.flavor == FL_PARAMETER
+ && e->ts.type == BT_CHARACTER)
+ {
+ gfc_error ("UNIT specification at %L must "
+ "not be a character PARAMETER", &e->where);
+ return false;
+ }
+
if (gfc_resolve_expr (e)
&& (e->ts.type != BT_INTEGER
&& (e->ts.type != BT_CHARACTER || e->expr_type != EXPR_VARIABLE)))
+2019-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/89782
+ * gfortran.dg/io_constraints.f90: New test.
+
2019-06-22 Iain Sandoe <iain@sandoe.co.uk>
* gcc.target/powerpc/pr64205.c: Require effective target dfp.
--- /dev/null
+! { dg-do compile }
+program pr89782
+ character(len=*),parameter :: VALUES(*)=[character(len=10) :: 'NaN','NAN','nan','Inf','INF','inf','Infinity']
+ character(len=*),parameter :: VALUE='NaN'
+ real(4) :: var
+ do i=1,size(VALUES)
+ read(VALUES(i),*) float ! { dg-error "character PARAMETER" }
+ write(VALUES(i),*)float ! { dg-error "character PARAMETER" }
+ enddo
+ read(var,*)float ! { dg-error "INTEGER expression or a CHARACTER" }
+ read(VALUE,*)float ! { dg-error "character PARAMETER" }
+ write(VALUE,*)float ! { dg-error "character PARAMETER" }
+end program pr89782