summaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorarphaman <arphaman@gmail.com>2013-08-05 16:16:16 +0100
committerarphaman <arphaman@gmail.com>2013-08-05 16:16:16 +0100
commit81f7a76a9627dac91aa156b57121e744eb624757 (patch)
treeecf46924dc51f3229cdb09d3455dec90272b0776 /test/Parser
parent6527037a48e3b98b6cde1e0f353264ad151e4e66 (diff)
downloadflang-81f7a76a9627dac91aa156b57121e744eb624757.tar.gz
added parsing for select case stmt
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/selectcase.f9529
1 files changed, 29 insertions, 0 deletions
diff --git a/test/Parser/selectcase.f95 b/test/Parser/selectcase.f95
new file mode 100644
index 0000000000..5cf9be00a3
--- /dev/null
+++ b/test/Parser/selectcase.f95
@@ -0,0 +1,29 @@
+! RUN: %flang -fsyntax-only -verify < %s
+
+PROGRAM selecttest
+ INTEGER I
+ SELECT CASE(1)
+ END SELECT
+
+ I = 0
+ a: SELECT CASE(I)
+ CASE DEFAULT a
+ END SELECT a
+
+ SELECT CASE(I)
+ CASE (1,2)
+ I = 1
+ CASE (3:)
+ I = 42
+ END SELECT
+
+ SELECT CASE(I)
+ CASE (:1)
+ I = -1
+ CASE (2:6,7)
+ I = 3
+ CASE DEFAULT
+ I = 0
+ END SELECT
+
+END