+2018-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/85313
+ * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
+ (resolve_oacc_nested_loops): Likewise. Formatting fix.
+
2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/83064
"iteration space at %L", name, &do_code->loc);
break;
}
- if (j < i)
- break;
do_code2 = do_code2->block->next;
}
}
|| gfc_find_sym_in_expr (ivar, do_code->ext.iterator->end)
|| gfc_find_sym_in_expr (ivar, do_code->ext.iterator->step))
{
- gfc_error ("!$ACC LOOP %s loops don't form rectangular iteration space at %L",
- clause, &do_code->loc);
+ gfc_error ("!$ACC LOOP %s loops don't form rectangular "
+ "iteration space at %L", clause, &do_code->loc);
break;
}
- if (j < i)
- break;
do_code2 = do_code2->block->next;
}
}
--- /dev/null
+! PR fortran/85313
+! { dg-do compile }
+
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = i, 20 ! { dg-error "form rectangular iteration space" }
+ do k = 1, 2
+ end do
+ end do
+ end do
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = 1, 5
+ do k = i, 20 ! { dg-error "form rectangular iteration space" }
+ end do
+ end do
+ end do
+!$omp do collapse(3)
+ do i = 1, 10
+ do j = 1, 5
+ do k = j, 20 ! { dg-error "form rectangular iteration space" }
+ end do
+ end do
+ end do
+end