2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/91800
* decl.c (variable_decl): Reject Hollerith constants as type
initializer.
2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/91800
* gfortran.dg/hollerith_9.f90: New test.
+2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
+ Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/91800
+ * decl.c (variable_decl): Reject Hollerith constants as type
+ initializer.
+
2020-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/93500
goto cleanup;
}
+ if (gfc_current_state () == COMP_DERIVED
+ && initializer && initializer->ts.type == BT_HOLLERITH)
+ {
+ gfc_error ("Initialization of structure component with a HOLLERITH "
+ "constant at %L is not allowed", &initializer->where);
+ m = MATCH_ERROR;
+ goto cleanup;
+ }
+
if (gfc_current_state () == COMP_DERIVED
&& gfc_current_block ()->attr.pdt_template)
{
+2020-04-20 Steve Kargl <kargl@gcc.gnu.org>
+ Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/91800
+ * gfortran.dg/hollerith_9.f90: New test.
+
2020-04-19 David Edelsohn <dje.gcc@gmail.com>
* g++.dg/debug/dwarf2/pr85550.C: Skip AIX.
--- /dev/null
+! { dg-do compile }
+! PR 91800 - this used to cause an ICE.
+module m
+ type t(n) ! { dg-error "does not have a component corresponding to parameter" }
+ integer, len :: n = 4habcd ! { dg-error "Initialization of structure component with a HOLLERITH constant" }
+ end type
+end