Fix ICE for coarray Critical inside module procedure

From-SVN: r231649
This commit is contained in:
Alessandro Fanfarillo 2015-12-15 06:19:21 -07:00 committed by Alessandro Fanfarillo
parent 4a414de84a
commit 1fceb21584
4 changed files with 22 additions and 0 deletions

View file

@ -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

View file

@ -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();
}

View file

@ -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

View file

@ -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