summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/pr17724-6.C
blob: f95c4d0efbb635ccd0dc0fcbc9c4acfd60c1f591 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR tree-optimization/17724
// { dg-do compile }
// { dg-options "-O2" }

extern char *strcpy (char* d, const char* s);

class A { public: A (); ~A (); };

inline char * B (char *s, const char *t)
{ return ::strcpy (s, t); }

class C { int D (void); int E; };

int C::D (void)
{
  A a;
  try
    {
      char z[22];
      if (this->E) B (z, "");
      return 0;
    }
  catch (int &f) { return -1; }
}