diff options
author | arphaman <arphaman@gmail.com> | 2013-08-23 14:00:28 +0100 |
---|---|---|
committer | arphaman <arphaman@gmail.com> | 2013-08-23 14:00:28 +0100 |
commit | fce77de34bc781cbc150ee400fb365b22859975b (patch) | |
tree | 5d81e31570eaff02eed59c963fb0df840ce640e0 /test/Parser | |
parent | fb0d6b6efaf77b265405ddc6633efdb1c8cf2095 (diff) | |
download | flang-fce77de34bc781cbc150ee400fb365b22859975b.tar.gz |
added parsing for RECURSIVE TYPE and TYPE RECURSIVE; improved fixed-form relexing
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/assignedGoto.f95 | 2 | ||||
-rw-r--r-- | test/Parser/recursive.f | 16 | ||||
-rw-r--r-- | test/Parser/recursive.f95 | 11 |
3 files changed, 28 insertions, 1 deletions
diff --git a/test/Parser/assignedGoto.f95 b/test/Parser/assignedGoto.f95 index a2ca1d9664..0ae6c66006 100644 --- a/test/Parser/assignedGoto.f95 +++ b/test/Parser/assignedGoto.f95 @@ -9,7 +9,7 @@ PROGRAM gototest ASSIGN 10 TO DEST ASSIGN TO DEST ! expected-error {{expected statement label after 'ASSIGN'}} - ASSIGN 10 DEST ! expected-error {{expected 'TO'}} + ASSIGN 10 DEST ! expected-error {{expected 'to'}} ASSIGN 10 TO 2 ! expected-error {{expected identifier}} GO TO DEST diff --git a/test/Parser/recursive.f b/test/Parser/recursive.f index 0f6f648e25..7e488388e2 100644 --- a/test/Parser/recursive.f +++ b/test/Parser/recursive.f @@ -4,3 +4,19 @@ C RUN: %flang -fsyntax-only %s END RECU RSIV E FUNCTIO N F OO() END + + RECU RSIVE INTE GER FU NCTION FUNC() + FUNC = 1 + END + + INTEGER RECURS IVE FU NCTION FUNC2() + FUNC2 = 2 + END + + INTEGER(8) RECURS IVE FU NCTION FUNC3() + FUNC3 = 2 + END + + RECU RSIVE INTE GER (2) FU NCTION FUNC4() + FUNC4 = 1 + END diff --git a/test/Parser/recursive.f95 b/test/Parser/recursive.f95 index 02dc821990..864ae1d3fb 100644 --- a/test/Parser/recursive.f95 +++ b/test/Parser/recursive.f95 @@ -6,5 +6,16 @@ END RECURSIVE FUNCTION FOO() END +RECURSIVE INTEGER FUNCTION FUNC() + FUNC = 1 +END + +INTEGER RECURSIVE FUNCTION FUNC2() + FUNC2 = 2 +END + +RECURSIVE INTEGER RECURSIVE FUNCTION M() ! expected-error {{expected 'function'}} +END + RECURSIVE PROGRAM main ! expected-error {{expected 'function' or 'subroutine' after 'recursive'}} END |