+2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/13826
+ * primary.c (match_structure_constructor): Rename ...
+ (gfc_match_structure_constructor): ... to this. Make non-static.
+ (gfc_match_rvalue): Call renamed function.
+ * match.h (gfc_match_structure_constructor): Declare.
+ * match.c (gfc_match_data_constant): Handle structure
+ constructor.
+
2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/13702
preprocessor flags.
(all): Add missing initializers.
-
2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
* Make-lang.in (trans-common.o): Remove redundant dependency.
if (gfc_find_symbol (name, NULL, 1, &sym))
return MATCH_ERROR;
- if (sym == NULL || sym->attr.flavor != FL_PARAMETER)
+ if (sym == NULL
+ || (sym->attr.flavor != FL_PARAMETER && sym->attr.flavor != FL_DERIVED))
{
gfc_error ("Symbol '%s' must be a PARAMETER in DATA statement at %C",
name);
return MATCH_ERROR;
}
+ else if (sym->attr.flavor == FL_DERIVED)
+ return gfc_match_structure_constructor (sym, result);
*result = gfc_copy_expr (sym->value);
return MATCH_YES;
match gfc_match_target (void);
/* primary.c */
+match gfc_match_structure_constructor (gfc_symbol *, gfc_expr **);
match gfc_match_rvalue (gfc_expr **);
match gfc_match_variable (gfc_expr **, int);
match gfc_match_actual_arglist (int, gfc_actual_arglist **);
/* Match a structure constructor. The initial symbol has already been
seen. */
-static match
-match_structure_constructor (gfc_symbol * sym, gfc_expr ** result)
+match
+gfc_match_structure_constructor (gfc_symbol * sym, gfc_expr ** result)
{
gfc_constructor *head, *tail;
gfc_component *comp;
if (sym == NULL)
m = MATCH_ERROR;
else
- m = match_structure_constructor (sym, &e);
+ m = gfc_match_structure_constructor (sym, &e);
break;
/* If we're here, then the name is known to be the name of a
+2004-05-15 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
+
+ PR fortran/13826
+ * gfortran.fortran-torture/compile/data_1.f90: New test.
+
2004-05-15 Ulrich Weigand <uweigand@de.ibm.com>
* gcc.dg/const-elim-1.c: Remove XFAIL for s390*-*-*.
--- /dev/null
+! this tests the fix for PR 13826
+TYPE a
+ REAL x
+END TYPE
+TYPE(a) :: y
+DATA y /a(1.)/ ! used to give an error about non-PARAMETER
+END