From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gfortran.dg/block_name_1.f90 | 78 ++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/block_name_1.f90 (limited to 'gcc/testsuite/gfortran.dg/block_name_1.f90') diff --git a/gcc/testsuite/gfortran.dg/block_name_1.f90 b/gcc/testsuite/gfortran.dg/block_name_1.f90 new file mode 100644 index 000000000..600885c3a --- /dev/null +++ b/gcc/testsuite/gfortran.dg/block_name_1.f90 @@ -0,0 +1,78 @@ +! { dg-do compile } +! Verify that the compiler accepts the various legal combinations of +! using construct names. +! +! The correct behavior of EXIT and CYCLE is already established in +! the various DO related testcases, they're included here for +! completeness. + dimension a(5) + i = 0 + ! construct name is optional on else clauses + ia: if (i > 0) then + i = 1 + else + i = 2 + end if ia + ib: if (i < 0) then + i = 3 + else ib + i = 4 + end if ib + ic: if (i < 0) then + i = 5 + else if (i == 0) then ic + i = 6 + else if (i == 1) then + i =7 + else if (i == 2) then ic + i = 8 + end if ic + + fa: forall (i=1:5, a(i) > 0) + a(i) = 9 + end forall fa + + wa: where (a > 0) + a = -a + elsewhere + wb: where (a == 0) + a = a + 1. + elsewhere wb + a = 2*a + end where wb + end where wa + + j = 1 + sa: select case (i) + case (1) + i = 2 + case (2) sa + i = 3 + case default sa + sb: select case (j) + case (1) sb + i = j + case default + j = i + end select sb + end select sa + + da: do i=1,10 + cycle da + cycle + exit da + exit + db: do + cycle da + cycle db + cycle + exit da + exit db + exit + j = i+1 + end do db + dc: do while (j>0) + j = j-1 + end do dc + end do da +end -- cgit v1.2.3