2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
PR fortran/85083
* primary.c (gfc_convert_to_structure_constructor): Check
conformance of argument types in structure constructor.
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
* gfortran.dg/structure_constructor_15.f90: New test.
Co-Authored-By: Harald Anlauf <anlauf@gmx.de>
From-SVN: r258899
+2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
+ Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/85083
+ * primary.c (gfc_convert_to_structure_constructor): Check
+ conformance of argument types in structure constructor.
+
2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/66709
if (this_comp->ts.type == BT_CHARACTER && !this_comp->attr.allocatable
&& this_comp->ts.u.cl && this_comp->ts.u.cl->length
&& this_comp->ts.u.cl->length->expr_type == EXPR_CONSTANT
+ && actual->expr->ts.type == BT_CHARACTER
&& actual->expr->expr_type == EXPR_CONSTANT)
{
ptrdiff_t c, e;
+2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
+ Harald Anlauf <anlauf@gmx.de>
+
+ * gfortran.dg/structure_constructor_15.f90: New test.
+
2018-03-27 Volker Reichelt <v.reichelt@netcologne.de>
* g++.dg/cpp0x/defaulted2.C: Use dg-message instead of dg-error
--- /dev/null
+! { dg-do compile }
+! PR 85083
+!
+! Testcase from PR by G. Steinmetz <gscfq@t-online.de>
+!
+program p
+ type t
+ character(3) :: c
+ end type t
+ type(t), allocatable :: z
+ allocate (z, source=t(.true.,'abc')) ! { dg-error "Too many components" }
+end