Fix test-suite fallout of default -Wreturn-type.
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr69432.C
blobd024ece4cbacc968b781e787ce13ca9fb16f35c3
1 // PR target/69432
2 // { dg-do compile }
3 // { dg-options "-O3" }
4 // { dg-additional-options "-minline-stringops-dynamically" { target i?86-*-* x86_64-*-* } }
6 template <typename S, typename T, typename U>
7 void
8 f1 (S x, T y, U z)
10   for (; y; --y, ++x)
11     *x = z;
14 template <typename S, typename T, typename U>
15 void f2 (S x, T y, U z)
17   f1 (x, y, z);
20 struct A {};
21 struct B { static char f3 (A, unsigned); };
23 template <typename S, typename U>
24 void f4 (S, U);
26 struct C
28   template <typename S, typename T, typename U>
29   static S f5 (S x, T y, U z) { f2 (x, y, z); return S(); }
32 template <typename S, typename T, typename U>
33 void f6 (S x, T y, U z) { C::f5 (x, y, z); }
35 template <typename S, typename T, typename U, typename V>
36 void f7 (S x, T y, U z, V) { f6 (x, y, z); }
38 struct E
40   struct D : A { char e; D (A); };
41   A f;
42   E (int x) : g(f) { f8 (x); }
43   ~E ();
44   D g;
45   void f9 (int x) { x ? B::f3 (g, x) : char (); }
46   void f8 (int x) { f9 (x); }
49 struct F : E
51   F (int x) : E(x) { f10 (x); f4 (this, 0); }
52   char h;
53   void f10 (int x) { f7 (&g.e, x, h, 0); }
56 long a;
58 void
59 test ()
61   F b(a);