aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2014-01-12 12:08:31 +0100
committerJanus Weil <janus@gcc.gnu.org>2014-01-12 12:08:31 +0100
commita1b80ec7e0e9cea1107b77bdd1424ab853cda5c7 (patch)
treedf081583aa6531c6dfbbe8da353b1070028d5864 /gcc/fortran/decl.c
parent915afe449440134666fb1b6f4465588f878aadf6 (diff)
downloadgcc-a1b80ec7e0e9cea1107b77bdd1424ab853cda5c7.zip
gcc-a1b80ec7e0e9cea1107b77bdd1424ab853cda5c7.tar.gz
gcc-a1b80ec7e0e9cea1107b77bdd1424ab853cda5c7.tar.bz2
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
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c
index e8ac941..8831b19 100644
--- a/gcc/fortran/decl.c
+++ b/gcc/fortran/decl.c
@@ -4287,12 +4287,10 @@ gfc_match_data_decl (void)
|| current_ts.u.derived->attr.zero_comp))
goto ok;
- /* Now we have an error, which we signal, and then fix up
- because the knock-on is plain and simple confusing. */
- gfc_error_now ("Derived type at %C has not been previously defined "
- "and so cannot appear in a derived type definition");
- current_attr.pointer = 1;
- goto ok;
+ gfc_error ("Derived type at %C has not been previously defined "
+ "and so cannot appear in a derived type definition");
+ m = MATCH_ERROR;
+ goto cleanup;
}
ok: