summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/20021011-1.c
blob: b1b2c406a712e28308611c8f2620e04ae412a0ad (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 opt/8165.  */

extern void abort (void);

char buf[64];

int
main (void)
{
  int i;

  __builtin_strcpy (buf, "mystring");
  if (__builtin_strcmp (buf, "mystring") != 0)
    abort ();

  for (i = 0; i < 16; ++i)
    {
      __builtin_strcpy (buf + i, "mystring");
      if (__builtin_strcmp (buf + i, "mystring") != 0)
	abort ();
    }

  return 0;
}