-2019-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
+2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/87944
+ * decl.c (match_data_constant): Allow inquiry parameter as data
+ constant in data statement.
+
+2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88138
* decl.c (variable_decl): Check that a derived isn't being assigned
}
else if (m == MATCH_YES)
{
+ /* If a parameter inquiry ends up here, symtree is NULL but **result
+ contains the right constant expression. Check here. */
+ if ((*result)->symtree == NULL
+ && (*result)->expr_type == EXPR_CONSTANT
+ && ((*result)->ts.type == BT_INTEGER
+ || (*result)->ts.type == BT_REAL))
+ return m;
+
/* F2018:R845 data-stmt-constant is initial-data-target.
A data-stmt-constant shall be ... initial-data-target if and
only if the corresponding data-stmt-object has the POINTER
+2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/87944
+ * gfortran.dg/pr87994_1.f90: New test.
+ * gfortran.dg/pr87994_2.f90: Ditto.
+ * gfortran.dg/pr87994_3.f90: Ditto.
+
2018-12-16 Jakub Jelinek <jakub@redhat.com>
PR c++/88482
* g++.dg/eh/builtin11.C: New test.
* g++.dg/parse/crash55.C: Adjust expected diagnostics.
-2019-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
+2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/88138
* gfortran.dg/pr88138.f90: new test.
--- /dev/null
+! { dg-do run }
+! PR fortran/87994
+program p
+ real :: a, b
+ data b /a%kind/
+ if (b /= kind(a)) stop 1
+end
--- /dev/null
+! { dg-do run }
+! PR fortran/87994
+program p
+ real, parameter :: a = 1.0
+ data b /a%kind/
+ if (b /= kind(a)) stop 1
+end
--- /dev/null
+! { dg-do run }
+! PR fortran/87994
+program p
+ integer, parameter :: a = 1
+ integer :: b
+ data b /a%kind/
+ if (b /= kind(a)) stop = 1
+end