aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr41573.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr41573.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr41573.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr41573.c b/gcc/testsuite/gcc.dg/pr41573.c
new file mode 100644
index 00000000000..52961db8f22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41573.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+__inline __attribute__ ((__always_inline__)) char *
+strcpy (char *__dest, __const char *__src)
+{
+ return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+const char* get_attr(unsigned attr)
+{
+ static char tmp[256];
+
+ strcpy(tmp, "");
+ return tmp;
+}