summaryrefslogtreecommitdiff
path: root/gcc/testsuite/treelang/execute/initial.tree
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/treelang/execute/initial.tree')
-rw-r--r--gcc/testsuite/treelang/execute/initial.tree20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/treelang/execute/initial.tree b/gcc/testsuite/treelang/execute/initial.tree
new file mode 100644
index 00000000000..0daa9970019
--- /dev/null
+++ b/gcc/testsuite/treelang/execute/initial.tree
@@ -0,0 +1,20 @@
+// { dg-do run }
+// Tests whether initializtion works properly.
+external_reference void abort ();
+external_reference void exit (int code);
+external_definition int main ();
+
+main
+{
+ automatic int aaa = +3;
+
+ if (aaa == +3)
+ {
+ exit (0);
+ }
+ else
+ {
+ abort ();
+ }
+ return 0;
+}