Debian Codegraph @

gcc/testsuite/g++.dg/opt/pr62146.C

raw
1 /* PR rtl-optimization/62146 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 " } */
4 class F
5 {
6 public:
7 virtual ~ F ();
8 };
9 template < class CL > class G:public F
10 {
11 int *member_;
12 public:
13 G ( int *b): member_ (0)
14 {
15 }
16 };
17
18 class D
19 {
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 *);
27 };
28
29 void fn1 ();
30 class C1
31 {
32 void foo();
33 class TokenType
34 {
35 public:
36 void AddToken ()
37 {
38 }
39 };
40 C1::TokenType bar_t;
41 };
42 D a;
43 void C1::foo()
44 {
45 if (&bar_t)
46 fn1 ();
47 for (int i = 0; i < sizeof 0; ++i)
48 a.RegisterNonTagCallback (0, &TokenType::AddToken);
49 }
50
51 /* { dg-final { scan-assembler-not "mov.*_ZN2C19TokenType8AddTokenEv, .\\\(" } } */