.
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / pr44372.C
blobdbdd865cfb645ed2258a535d3c8feee6fe5dba89
1 /* { dg-do compile } */
2 /* { dg-options "-O -fipa-cp -fipa-cp-clone" } */
3 /* { dg-additional-options "-Wno-return-type" } */
5 template < typename > class S3;
7 struct S1
9   struct
10   {
11     int i[10];
12   } s0;
13   S1 () : s0 ()
14   { }
15   template < typename T > S1 (S3 < T > s3, int)
16   {
17     f (s3);
18   }
21 struct S2
23   template < typename T > S2 s (S3 < T > s3)
24   {
25     S1 (s3, 0);
26   }
27   S2 (int i) : j (i)
28   { }
29   int j;
30   S1 s1[10];
33 template < typename > struct S3
35   S3 ()
36   {
37     S2 (0).s (*this);
38   }
41 static inline void
42 f (S3 < int > s3)
44   extern bool m;
45   if (m)
46     S2 (0).s (s3);
49 S3 < int >s3;