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
+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.
--- /dev/null
+// { 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;
+}
--- /dev/null
+// { dg-do compile }
+external_reference void abort ();
+
+static int foo (int a);
+
+foo
+{
+ return a;
+}
--- /dev/null
+// { dg-do compile }
+static int foo ();
+static int bar (int a);
+
+foo
+{
+ return 1;
+}
+
+bar
+{
+ a = a + foo ();
+ return a;
+}
--- /dev/null
+// { dg-do compile }
+external_reference void exit(int); // { dg-error "(parse|syntax) error" }
+
+static int foo (int a);
+
+foo
+{
+ return a;
+}