Commit 307de100 by Steven G. Kargl

re PR fortran/91785 (ICE in check_assumed_size_reference, at fortran/resolve.c:1601)

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91785
	* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
	it locus set.

2019-10-02  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/91785
	* gfortran.dg/pr91785.f90: New test.

From-SVN: r276473
parent 939e9f69
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org> 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91785
* primary.c (gfc_match_varspec): Ensure an inquiry parameter has
it locus set.
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91942 PR fortran/91942
* io.c (match_vtag): Check for non-NULL result->symtree. * io.c (match_vtag): Check for non-NULL result->symtree.
(match_out_tag): Check for invalid constant due to inquiry parameter. (match_out_tag): Check for invalid constant due to inquiry parameter.
......
...@@ -2331,6 +2331,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag, ...@@ -2331,6 +2331,8 @@ gfc_match_varspec (gfc_expr *primary, int equiv_flag, bool sub_flag,
if (tmp && tmp->type == REF_INQUIRY) if (tmp && tmp->type == REF_INQUIRY)
{ {
if (!primary->where.lb || !primary->where.nextc)
primary->where = gfc_current_locus;
gfc_simplify_expr (primary, 0); gfc_simplify_expr (primary, 0);
if (primary->expr_type == EXPR_CONSTANT) if (primary->expr_type == EXPR_CONSTANT)
......
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org> 2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91785
* gfortran.dg/pr91785.f90: New test.
2019-10-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91942 PR fortran/91942
* gfortran.dg/pr91587.f90: Update dg-error regex. * gfortran.dg/pr91587.f90: Update dg-error regex.
* gfortran.dg/pr91942.f90: New test. * gfortran.dg/pr91942.f90: New test.
......
! { dg-do compile }
! PR fortran/91785
! Code contributed by Gerhard Steinmetz
program p
complex :: a(*) ! { dg-error "Assumed size array at" }
real :: b(2)
b = a%im ! { dg-error "upper bound in the last dimension" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment