diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-09-28 17:10:34 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2019-09-28 17:10:34 +0000 |
commit | 4c59710186081ed4b2d34ccda1190d43454543db (patch) | |
tree | 9fa7706092db03a25566cd9152d6f52a91704739 /gcc/fortran/decl.c | |
parent | 036aa59282d3084076e78216c6ba8e5291dc29f7 (diff) | |
download | gcc-4c59710186081ed4b2d34ccda1190d43454543db.zip gcc-4c59710186081ed4b2d34ccda1190d43454543db.tar.gz gcc-4c59710186081ed4b2d34ccda1190d43454543db.tar.bz2 |
re PR fortran/91802 (ICE in mio_name_expr_t, at fortran/module.c:2141)
2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org>
PR fortran/91802
* decl.c (attr_decl1): Check if rank+corank > 15.
2019-09-28 Steven G. Kargl <kargl@gcc.ngu.org>
PR fortran/91802
* gfortran.dg/pr91802.f90: New test.
From-SVN: r276254
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 278882d..31b2336 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -8468,6 +8468,15 @@ attr_decl1 (void) goto cleanup; } + /* Check F2018:C822. */ + if (sym->attr.dimension && sym->attr.codimension + && sym->as && sym->as->rank + sym->as->corank > 15) + { + gfc_error ("rank + corank of %qs exceeds 15 at %C", sym->name); + m = MATCH_ERROR; + goto cleanup; + } + if (sym->attr.cray_pointee && sym->as != NULL) { /* Fix the array spec. */ |