2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ext / namedret3.C
blob7a0e0d5943f66e6f8c296771c4e98fe2dd5ebdbe
1 // { dg-do assemble  }
2 // { dg-options "-Wno-deprecated" }
4 extern "C" void abort();
6 int f2(int *x)
8   *x = 1;
9   return 2;
12 int f1() return x // { dg-error "" } 
14   f2(&x); // { dg-error "" } 
17 void g()
19   int scratch[100];
20   int i;
21   for (i = 0; i < 100; ++i)
22     scratch[i] = 0;
25 int main()
27   g();
28   if (f1() != 1)
29     abort ();
30   return 0;