diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2006-08-06 04:58:04 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2006-08-06 04:58:04 +0000 |
commit | f970c857c9232309c68e39214e0fb65c0cfa615c (patch) | |
tree | 6f83df7381e246e6366f03d0e9609d8de8f0d748 /gcc/fortran/resolve.c | |
parent | 994c1cc04dda157794990bbe71412678e3d7fad8 (diff) | |
download | gcc-f970c857c9232309c68e39214e0fb65c0cfa615c.zip gcc-f970c857c9232309c68e39214e0fb65c0cfa615c.tar.gz gcc-f970c857c9232309c68e39214e0fb65c0cfa615c.tar.bz2 |
re PR fortran/28590 (A SEQUENCEd defined type which refers to another defined type generates a spurious complaint about the lack of SEQUENCE attribute in the latter)
2006-08-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28590
* parse.c (parse_derived): Remove the test for sequence type
components of a sequence type.
* resolve.c (resolve_fl_derived): Put the test here so that
pointer components are tested.
2006-08-06 Paul Thomas <pault@gcc.gnu.org>
PR fortran/28590
* gfortran.dg/sequence_types_1.f90: New test.
From-SVN: r115966
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index c327a82..cb45a2b 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -5392,6 +5392,17 @@ resolve_fl_derived (gfc_symbol *sym) return FAILURE; } + if (sym->attr.sequence) + { + if (c->ts.type == BT_DERIVED && c->ts.derived->attr.sequence == 0) + { + gfc_error ("Component %s of SEQUENCE type declared at %L does " + "not have the SEQUENCE attribute", + c->ts.derived->name, &sym->declared_at); + return FAILURE; + } + } + if (c->pointer || c->as == NULL) continue; |