summaryrefslogtreecommitdiff
path: root/test/Parser
diff options
context:
space:
mode:
authorarphaman <arphaman@gmail.com>2013-07-20 12:16:02 +0100
committerarphaman <arphaman@gmail.com>2013-07-20 12:16:02 +0100
commit64bed1937f6cc9121448c12f96a16562a87fcc35 (patch)
tree524899e7ba7eec35a97faa10d56c42724b5879e9 /test/Parser
parent199a2d551ec35c419a0816d799bf7b8ad9fe0e58 (diff)
downloadflang-64bed1937f6cc9121448c12f96a16562a87fcc35.tar.gz
added parser skip until and expectandconsume methods; improved diagnostics for some specification statements
Diffstat (limited to 'test/Parser')
-rw-r--r--test/Parser/dimension.f954
-rw-r--r--test/Parser/external.f956
-rw-r--r--test/Parser/implicit.f952
-rw-r--r--test/Parser/implicitNone.f954
-rw-r--r--test/Parser/parameter.f951
5 files changed, 17 insertions, 0 deletions
diff --git a/test/Parser/dimension.f95 b/test/Parser/dimension.f95
index 8b372cb37b..ee4c1dfbe6 100644
--- a/test/Parser/dimension.f95
+++ b/test/Parser/dimension.f95
@@ -9,4 +9,8 @@ PROGRAM dimtest
DIMENSION W(20 ! expected-error {{expected ')'}}
+ REAL A, B, C
+
+ DIMENSION A(1,2) B(3,4) ! expected-error {{expected ','}}
+
ENDPROGRAM
diff --git a/test/Parser/external.f95 b/test/Parser/external.f95
index 5b828262a9..10617480bc 100644
--- a/test/Parser/external.f95
+++ b/test/Parser/external.f95
@@ -4,5 +4,11 @@ PROGRAM exttest
EXTERNAL X Y ! expected-error {{expected ','}}
EXTERNAL 'ABS' ! expected-error {{expected identifier}}
+ EXTERNAL ZZ, &
+ MM, ! expected-error {{expected identifier}}
+
+ ! FIXME: move error location to after vv
+ EXTERNAL VV &
+ NN ! expected-error {{expected ','}}
END PROGRAM
diff --git a/test/Parser/implicit.f95 b/test/Parser/implicit.f95
index 0816593d67..aed537629e 100644
--- a/test/Parser/implicit.f95
+++ b/test/Parser/implicit.f95
@@ -10,6 +10,8 @@ PROGRAM imptest
IMPLICIT REAL X ! expected-error {{expected '('}}
IMPLICIT REAL (X ! expected-error {{expected ')'}}
+ IMPLICIT REAL(Z) INTEGER(V) ! expected-error {{expected ','}}
+
A = 33
B = 44.9
C = A
diff --git a/test/Parser/implicitNone.f95 b/test/Parser/implicitNone.f95
new file mode 100644
index 0000000000..5e731be808
--- /dev/null
+++ b/test/Parser/implicitNone.f95
@@ -0,0 +1,4 @@
+! RUN: %flang -fsyntax-only -verify < %s
+PROGRAM imptest
+ IMPLICIT NONE (V) ! expected-error {{expected line break or ';' at end of statement}}
+END
diff --git a/test/Parser/parameter.f95 b/test/Parser/parameter.f95
index e05b9363c7..f562cc36dd 100644
--- a/test/Parser/parameter.f95
+++ b/test/Parser/parameter.f95
@@ -10,5 +10,6 @@ PROGRAM paramtest
PARAMETER ! expected-error {{expected '('}}
PARAMETER (A = 1 B = 2) ! expected-error {{expected ','}}
PARAMETER (d = 33 ! expected-error {{expected ')'}}
+ PARAMETER (chuff = 1)
END PROGRAM paramtest