2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
* frontend-passes.c (do_subscript): Don't do anything
if inside an associate list.
2017-09-26 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.dg/gomp/associate1.f90: Remove unnecessary
warning from associate construct and do loop.
From-SVN: r253211
if (v->expr_type == EXPR_CONSTANT)
return 0;
+ /* Wrong warnings will be generated in an associate list. */
+ if (in_assoc_list)
+ return 0;
+
for (ref = v->ref; ref; ref = ref->next)
{
if (ref->type == REF_ARRAY && ref->u.ar.type == AR_ELEMENT)
type(dt) :: b(3)
i = 1
j = 2
- associate(k => v, l => a(i, j), m => a(i, :)) ! { dg-warning "out of bounds" }
+ associate(k => v, l => a(i, j), m => a(i, :))
associate(n => b(j)%c(:, :)%i, o => a, p => b)
!$omp parallel shared (l) ! { dg-error "ASSOCIATE name" }
!$omp end parallel
end do
k = 1
!$omp simd linear (k : 2) ! { dg-error "ASSOCIATE name" }
- do i = 1, 10 ! { dg-warning "out of bounds" }
+ do i = 1, 10
k = k + 2
end do
end associate