diff options
author | Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> | 2015-12-15 06:19:21 -0700 |
---|---|---|
committer | Alessandro Fanfarillo <afanfa@gcc.gnu.org> | 2015-12-15 06:19:21 -0700 |
commit | 1fceb21584e9176c22775f00641ee1fcb8c62798 (patch) | |
tree | 96efb8f7596c53012fc69bb52476b6843ef3a99b | |
parent | 4a414de84a8e51b60b0be0c6c3ad9c33f7310d92 (diff) | |
download | gcc-1fceb21584e9176c22775f00641ee1fcb8c62798.zip gcc-1fceb21584e9176c22775f00641ee1fcb8c62798.tar.gz gcc-1fceb21584e9176c22775f00641ee1fcb8c62798.tar.bz2 |
Fix ICE for coarray Critical inside module procedure
From-SVN: r231649
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/coarray_critical_1.f90 | 12 |
4 files changed, 22 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 869215d..27dc78c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2015-12-15 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> + + * resolve.c (resolve_critical): Committing symbols of + lock variables. + 2014-12-14 Tobias Burnus <burnus@net-b.de> PR fortran/68850 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 65a2b7f..3988b3c 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -8852,6 +8852,7 @@ resolve_critical (gfc_code *code) symtree->n.sym->as->cotype = AS_EXPLICIT; symtree->n.sym->as->lower[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1); + gfc_commit_symbols(); } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d08b400..633f8b2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-12-15 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> + + * gfortran.dg/coarray_critical_1.f90: New. + 2015-12-15 Martin Jambor <mjambor@suse.cz> PR ipa/68851 diff --git a/gcc/testsuite/gfortran.dg/coarray_critical_1.f90 b/gcc/testsuite/gfortran.dg/coarray_critical_1.f90 new file mode 100644 index 0000000..4d93bf6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/coarray_critical_1.f90 @@ -0,0 +1,12 @@ +! { dg-do compile } +! { dg-options "-fcoarray=lib" } +! + +module m + contains + subroutine f() + critical + end critical + end subroutine f + end module m +end program |