! { dg-do run }
! Simple test program to see if gfortran eliminates the 'case (3:2)'
! statement. This is an unreachable CASE because the range is empty.
!
program select_3
integer i
do i = 1,
! { dg-do run }
! Short test program with a CASE statement that uses a range.
!
program select_4
integer i
do i = 1, 34, 4
select case(i)
case (:5)
if (i /= 1 .and. i /= 5) call
! { dg-do compile }
! Check for overlapping case range diagnostics.
!
program select_5
integer i
select case(i)
case (20:30) ! { dg-error "overlaps with CASE" }
case (25:) ! { dg-error "overla
! { dg-do run }
! Simple test for SELECT CASE
!
program select_2
integer i
do i = 1, 5
select case(i)
case (1)
if (i /= 1) call abort
case (2:3)
if (i /= 2 .and. i /=
main()
{
if (wwrite((long long) 0) != 123)
abort();
exit(0);
}
int
wwrite(long long i)
{
switch(i)
{
case 3:
case 10:
case 23:
case 28:
case 47:
return 0;