Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/do_corner_warn.f90 @ 128:fe568345ddd5
fix CbC-example
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 19:32:28 +0900 |
parents | 04ced10e8804 |
children | 84e7813d76e9 |
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) call abort ! 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) call abort end program