diff options
author | arphaman <arphaman@gmail.com> | 2013-07-24 19:40:16 +0100 |
---|---|---|
committer | arphaman <arphaman@gmail.com> | 2013-07-24 19:40:16 +0100 |
commit | 28ce124c929e38a245021036c8a0bdae95c12c9e (patch) | |
tree | 455ba617087670f24133419f94d4e69b49f94c01 /test/Parser | |
parent | 4ac823458ca43cc81dff0eca5da5ff7b435719ef (diff) | |
download | flang-28ce124c929e38a245021036c8a0bdae95c12c9e.tar.gz |
improved implicit rules for function calls and call stmt
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/call.f95 | 1 | ||||
-rw-r--r-- | test/Parser/expressions.f95 | 1 | ||||
-rw-r--r-- | test/Parser/implicitFunctions.f95 | 17 |
3 files changed, 17 insertions, 2 deletions
diff --git a/test/Parser/call.f95 b/test/Parser/call.f95 index f770d383f7..e20ea447ab 100644 --- a/test/Parser/call.f95 +++ b/test/Parser/call.f95 @@ -8,7 +8,6 @@ PROGRAM test CALL SUB() CALL FUNC(1,2) - CALL void ! expected-error {{expected a function after 'CALL'}} CALL 22 ! expected-error {{expected identifier}} CALL FUNC(1,2 ! expected-error {{expected ')'}} diff --git a/test/Parser/expressions.f95 b/test/Parser/expressions.f95 index 1573ff7dca..476dd43414 100644 --- a/test/Parser/expressions.f95 +++ b/test/Parser/expressions.f95 @@ -32,5 +32,4 @@ PROGRAM expressions x = ! expected-error {{expected an expression after '='}} - x = A ! expected-error {{use of undeclared identifier 'a'}} ENDPROGRAM expressions diff --git a/test/Parser/implicitFunctions.f95 b/test/Parser/implicitFunctions.f95 new file mode 100644 index 0000000000..632c82a3af --- /dev/null +++ b/test/Parser/implicitFunctions.f95 @@ -0,0 +1,17 @@ +! RUN: %flang -fsyntax-only -verify < %s +! RUN: %flang -fsyntax-only -verify -ast-print %s 2>&1 | %file_check %s + +PROGRAM imptest + integer i + real func + real func2 + real func3(10) + + i = 0 + func2 = 1 + i = abs(i) ! CHECK: i = abs(i) + i = foo(i) ! CHECK: i = int(foo(i)) + i = func(i)! CHECK: i = int(func(i)) + i = func3(i) ! CHECK: i = int(func3(i)) + i = func2(i) ! expected-error {{unexpected '('}} +END |