diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2012-07-16 20:58:04 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2012-07-16 20:58:04 +0000 |
commit | c2092deb7f2a90a56c44db0439ef60309e1e2d75 (patch) | |
tree | ae9f29d2e110538a9051f69e9510fe356b5aeaff /gcc/fortran/resolve.c | |
parent | 8db81fb2feeb722b0b49db4750e58fc1ecd05bff (diff) | |
download | gcc-c2092deb7f2a90a56c44db0439ef60309e1e2d75.zip gcc-c2092deb7f2a90a56c44db0439ef60309e1e2d75.tar.gz gcc-c2092deb7f2a90a56c44db0439ef60309e1e2d75.tar.bz2 |
re PR fortran/53824 (ICE with ALLOCATE of coarrays)
2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/53824
* resolve.c (resolve_allocate_deallocate): If both
start indices are NULL, skip the test for equality.
2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
PR fortran/53824
* gfortran.dg/coarray_allocate_1.f90: New test.
From-SVN: r189549
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r-- | gcc/fortran/resolve.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 03f74df..ab79460 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -7326,8 +7326,8 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn) } } - /* Check that an allocate-object appears only once in the statement. - FIXME: Checking derived types is disabled. */ + /* Check that an allocate-object appears only once in the statement. */ + for (p = code->ext.alloc.list; p; p = p->next) { pe = p->expr; @@ -7377,9 +7377,10 @@ resolve_allocate_deallocate (gfc_code *code, const char *fcn) { gfc_array_ref *par = &(pr->u.ar); gfc_array_ref *qar = &(qr->u.ar); - if (gfc_dep_compare_expr (par->start[0], - qar->start[0]) != 0) - break; + if ((par->start[0] != NULL || qar->start[0] != NULL) + && gfc_dep_compare_expr (par->start[0], + qar->start[0]) != 0) + break; } } else |