view gcc/testsuite/g++.dg/opt/pr17724-2.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

// PR tree-optimization/17724
// { dg-do compile }
// { dg-options "-O2" }

namespace N { char *strcpy (char *, const char *); }
extern "C" char *strcpy (char *, const char *);
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;
}