OSDN Git Service

* g++.old-deja/g++.other/init5.C: Remove xfail for powerpc-linux.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / defarg8.C
1 // { dg-do assemble  }
2 // { dg-options "-pedantic-errors -ansi -w" }
3
4 // Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 7 Jan 2001 <nathan@codesourcery.com>
6
7 // As of G++ 3.4, we no longer attempt to detect dependencies; the
8 // standard does not require that we do.
9
10 // Bug 1038. Default args on class members can produce circular dependencies.
11 // Make sure we spot them, and don't depend on a particular ordering.
12
13 struct AA
14 {
15   static int Foo (int = Baz ()); // { dg-error "" } not yet been parsed
16   static int Baz (int = Foo ());
17 };
18
19 int main ()
20 {
21   AA::Foo ();
22   AA::Foo (1);
23   AA::Baz ();
24   AA::Baz (1);
25   
26   return 0;
27 }