mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/87994 (ICE in match_data_constant, at fortran/decl.c:399)
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/87944 * gfortran.dg/pr87994_1.f90: New test. * gfortran.dg/pr87994_2.f90: Ditto. * gfortran.dg/pr87994_3.f90: Ditto. From-SVN: r267184
This commit is contained in:
parent
3dd6f57375
commit
19adb97a31
|
|
@ -1,4 +1,10 @@
|
||||||
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
|
PR fortran/88138
|
||||||
* decl.c (variable_decl): Check that a derived isn't being assigned
|
* decl.c (variable_decl): Check that a derived isn't being assigned
|
||||||
|
|
|
||||||
|
|
@ -399,6 +399,14 @@ match_data_constant (gfc_expr **result)
|
||||||
}
|
}
|
||||||
else if (m == MATCH_YES)
|
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.
|
/* F2018:R845 data-stmt-constant is initial-data-target.
|
||||||
A data-stmt-constant shall be ... initial-data-target if and
|
A data-stmt-constant shall be ... initial-data-target if and
|
||||||
only if the corresponding data-stmt-object has the POINTER
|
only if the corresponding data-stmt-object has the POINTER
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
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>
|
2018-12-16 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR c++/88482
|
PR c++/88482
|
||||||
|
|
@ -10,7 +17,7 @@
|
||||||
* g++.dg/eh/builtin11.C: New test.
|
* g++.dg/eh/builtin11.C: New test.
|
||||||
* g++.dg/parse/crash55.C: Adjust expected diagnostics.
|
* 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
|
PR fortran/88138
|
||||||
* gfortran.dg/pr88138.f90: new test.
|
* gfortran.dg/pr88138.f90: new test.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
! { dg-do run }
|
||||||
|
! PR fortran/87994
|
||||||
|
program p
|
||||||
|
real :: a, b
|
||||||
|
data b /a%kind/
|
||||||
|
if (b /= kind(a)) stop 1
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
! { dg-do run }
|
||||||
|
! PR fortran/87994
|
||||||
|
program p
|
||||||
|
real, parameter :: a = 1.0
|
||||||
|
data b /a%kind/
|
||||||
|
if (b /= kind(a)) stop 1
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
! { 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
|
||||||
Loading…
Reference in New Issue