diff options
author | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-24 16:14:19 +0000 |
---|---|---|
committer | phython <phython@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-24 16:14:19 +0000 |
commit | 3e0fccfd1ab85fc4a11cfeb80c8d4139e7cb288c (patch) | |
tree | d41483ade5eeb2ae709fdae88e3165831f2fba5a /gcc/testsuite/treelang | |
parent | 8558f75a50829d87f6048b61dc8243db922f3052 (diff) | |
download | gcc-3e0fccfd1ab85fc4a11cfeb80c8d4139e7cb288c.tar.gz |
2005-02-24 James A. Morrison <phython@gcc.gnu.org>
PR other/19897
* compile/exit.tree, compile/extref.tree, compile/function-1.tree,
compile/syntax-1.tree: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95502 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/treelang')
-rw-r--r-- | gcc/testsuite/treelang/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/treelang/compile/exit.tree | 12 | ||||
-rw-r--r-- | gcc/testsuite/treelang/compile/extref.tree | 9 | ||||
-rw-r--r-- | gcc/testsuite/treelang/compile/function-1.tree | 14 | ||||
-rw-r--r-- | gcc/testsuite/treelang/compile/syntax-1.tree | 9 |
5 files changed, 50 insertions, 0 deletions
diff --git a/gcc/testsuite/treelang/ChangeLog b/gcc/testsuite/treelang/ChangeLog index c60765b837c..13021aa1fa1 100644 --- a/gcc/testsuite/treelang/ChangeLog +++ b/gcc/testsuite/treelang/ChangeLog @@ -1,3 +1,9 @@ +2005-02-24 James A. Morrison <phython@gcc.gnu.org> + + PR other/19897 + * compile/exit.tree, compile/extref.tree, compile/function-1.tree, + compile/syntax-1.tree: New tests. + 2004-10-02 James A. Morrison <phython@gcc.gnu.org> * compile/autofunc.tree: New File. diff --git a/gcc/testsuite/treelang/compile/exit.tree b/gcc/testsuite/treelang/compile/exit.tree new file mode 100644 index 00000000000..fd12e3568f6 --- /dev/null +++ b/gcc/testsuite/treelang/compile/exit.tree @@ -0,0 +1,12 @@ +// { dg-do compile { xfail *-*-* } } +external_reference void exit (int code); + +static int foo (); + +foo +{ + automatic int bar = +1; + bar = bar + +1; + exit (0); // Calling external references is currently broken. + return bar; +} diff --git a/gcc/testsuite/treelang/compile/extref.tree b/gcc/testsuite/treelang/compile/extref.tree new file mode 100644 index 00000000000..085ab8f88fd --- /dev/null +++ b/gcc/testsuite/treelang/compile/extref.tree @@ -0,0 +1,9 @@ +// { dg-do compile } +external_reference void abort (); + +static int foo (int a); + +foo +{ + return a; +} diff --git a/gcc/testsuite/treelang/compile/function-1.tree b/gcc/testsuite/treelang/compile/function-1.tree new file mode 100644 index 00000000000..6bb4e370a48 --- /dev/null +++ b/gcc/testsuite/treelang/compile/function-1.tree @@ -0,0 +1,14 @@ +// { dg-do compile } +static int foo (); +static int bar (int a); + +foo +{ + return 1; +} + +bar +{ + a = a + foo (); + return a; +} diff --git a/gcc/testsuite/treelang/compile/syntax-1.tree b/gcc/testsuite/treelang/compile/syntax-1.tree new file mode 100644 index 00000000000..32efe744ca2 --- /dev/null +++ b/gcc/testsuite/treelang/compile/syntax-1.tree @@ -0,0 +1,9 @@ +// { dg-do compile } +external_reference void exit(int); // { dg-error "(parse|syntax) error" } + +static int foo (int a); + +foo +{ + return a; +} |