Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/do_corner_warn.f90 @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 84e7813d76e9 |
children |
line wrap: on
line source
! { dg-options "-Wundefined-do-loop" } ! Program to check corner cases for DO statements. program do_1 implicit none integer i, j ! limit=HUGE(i), step 1 j = 0 do i = HUGE(i) - 10, HUGE(i), 1 ! { dg-warning "is undefined as it overflows" } j = j + 1 end do if (j .ne. 11) STOP 1 ! limit=-HUGE(i)-1, step -1 j = 0 do i = -HUGE(i) + 10 - 1, -HUGE(i) - 1, -1 ! { dg-warning "is undefined as it underflows" } j = j + 1 end do if (j .ne. 11) STOP 2 end program