re PR fortran/45595 (segfault on omp collapse)
PR fortran/45595 * openmp.c (resolve_omp_do): Report not enough do loops for collapse even if block->next is NULL. * gfortran.dg/gomp/pr45595.f90: New test. From-SVN: r164004
This commit is contained in:
parent
42a3beeb9a
commit
9c2934f4d9
|
@ -1,3 +1,9 @@
|
|||
2010-09-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/45595
|
||||
* openmp.c (resolve_omp_do): Report not enough do loops for
|
||||
collapse even if block->next is NULL.
|
||||
|
||||
2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/45576
|
||||
|
|
|
@ -1516,7 +1516,8 @@ resolve_omp_do (gfc_code *code)
|
|||
break;
|
||||
}
|
||||
do_code = do_code->next;
|
||||
if (do_code->op != EXEC_DO && do_code->op != EXEC_DO_WHILE)
|
||||
if (do_code == NULL
|
||||
|| (do_code->op != EXEC_DO && do_code->op != EXEC_DO_WHILE))
|
||||
{
|
||||
gfc_error ("not enough DO loops for collapsed !$OMP DO at %L",
|
||||
&code->loc);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-09-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR fortran/45595
|
||||
* gfortran.dg/gomp/pr45595.f90: New test.
|
||||
|
||||
2010-09-08 Michael Matz <matz@suse.de>
|
||||
|
||||
* c-c++-common/uninit-17.c: Adjust.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
! PR fortran/45595
|
||||
! { dg-do compile }
|
||||
! { dg-options "-fopenmp" }
|
||||
|
||||
subroutine foo(l,u)
|
||||
integer :: k,l,u
|
||||
!$omp parallel do shared(l,u) collapse(3) ! { dg-error "not enough DO loops" }
|
||||
do k = l,u
|
||||
end do
|
||||
end subroutine
|
Loading…
Reference in New Issue