Commit a1b80ec7 by Janus Weil

re PR fortran/58026 ([F03] Bad error recovery for allocatable component of undeclared type)

2014-01-12  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/58026
	* decl.c (gfc_match_data_decl): Improve error recovery.


2014-01-12  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/58026
	* gfortran.dg/alloc_comp_basics_6.f90: New.

From-SVN: r206564
parent 915afe44
2014-01-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/58026
* decl.c (gfc_match_data_decl): Improve error recovery.
2014-01-09 Tobias Burnus <burnus@net-b.de> 2014-01-09 Tobias Burnus <burnus@net-b.de>
* cpp.c (gfc_cpp_handle_option): Add missing break. * cpp.c (gfc_cpp_handle_option): Add missing break.
......
...@@ -4287,12 +4287,10 @@ gfc_match_data_decl (void) ...@@ -4287,12 +4287,10 @@ gfc_match_data_decl (void)
|| current_ts.u.derived->attr.zero_comp)) || current_ts.u.derived->attr.zero_comp))
goto ok; goto ok;
/* Now we have an error, which we signal, and then fix up gfc_error ("Derived type at %C has not been previously defined "
because the knock-on is plain and simple confusing. */ "and so cannot appear in a derived type definition");
gfc_error_now ("Derived type at %C has not been previously defined " m = MATCH_ERROR;
"and so cannot appear in a derived type definition"); goto cleanup;
current_attr.pointer = 1;
goto ok;
} }
ok: ok:
......
2014-01-12 Janus Weil <janus@gcc.gnu.org>
PR fortran/58026
* gfortran.dg/alloc_comp_basics_6.f90: New.
2014-01-11 Steven G. Kargl <kargl@gcc.gnu.org> 2014-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/59700 PR fortran/59700
......
! { dg-do compile }
!
! PR 58026: Bad error recovery for allocatable component of undeclared type
!
! Contributed by Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
type sysmtx_t
type(ext_complex_t), allocatable :: S(:) ! { dg-error "has not been previously defined" }
end type
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