1 /* Copyright (C) 2003 Free Software Foundation.
3 Test strcpy optimizations don't evaluate side-effects twice.
5 Written by Jakub Jelinek, June 23, 2003. */
7 typedef __SIZE_TYPE__
size_t;
8 extern char *strcpy (char *, const char *);
9 extern int memcmp (const void *, const void *, size_t);
10 extern void abort (void);
11 extern void exit (int);
14 test1 (char *s
, size_t i
)
16 strcpy (s
, "foobarbaz" + i
++);
32 strcpy (s
, "foobarbaz" + check2 ());
39 if (test1 (buf
, 7) != 8 || memcmp (buf
, "az", 3))
42 if (memcmp (buf
, "baz", 4))