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

namespace N { char *strcpy (char *, const char *); }
extern "C" char *strcpy (char *, const char *) throw ();
inline char *N::strcpy (char *s, const char *t) { return ::strcpy (s, t); }

struct S { ~S (); };
int foo ();

int
main ()
{
  S s;
  int a;
  char b[64];
  N::strcpy (b, "ABCDEFGHIJKLM");
  while ((a = foo ()) != -1)
    if (a)
      return -1;
  return 0;
}