2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr62146.C
blobdbe41743424b554911b594b1dac51f1dca9da22f
1 /* PR rtl-optimization/62146 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 " } */
4 class F
6 public:
7     virtual ~ F ();
8 };
9 template < class CL > class G:public F
11     int *member_;
12 public:
13     G ( int *b): member_ (0)
14     {
15     }
18 class D
20 public:
21     template < class CL > void RegisterNonTagCallback (int,
22             void (CL::
23                   *p3) ())
24     {
25         InternalRegisterNonTag (p3 ? new G < CL > ( 0) : 0);
26     } void InternalRegisterNonTag (F *);
29 void fn1 ();
30 class C1
32     void  foo();
33     class TokenType
34     {
35     public:
36         void AddToken ()
37         {
38         }
39     };
40     C1::TokenType bar_t;
42 D a;
43 void C1::foo()
45     if (&bar_t)
46         fn1 ();
47     for (int i = 0; i < sizeof 0; ++i)
48         a.RegisterNonTagCallback (0, &TokenType::AddToken);
51 /* { dg-final { scan-assembler-not "mov.*_ZN2C19TokenType8AddTokenEv, .\\\(" } } */