From: Jan Hubicka Date: Wed, 13 May 2015 02:57:27 +0000 (+0200) Subject: re PR ipa/65873 (Failure to inline always_inline memcpy) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e4b5b3a5cb422662b1c4ef1102bf559082017ac3;p=gcc.git re PR ipa/65873 (Failure to inline always_inline memcpy) PR ipa/65873 * ipa-inline.c (can_inline_edge_p): Allow early inlining of always inlines across optimization boundary. * testsuite/gcc.c-torture/compile/pr65873.c: New testcase. From-SVN: r223108 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d8b6a582e7b..fedfe439628 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-05-12 Jan Hubicka + + PR ipa/65873 + * gcc.c-torture/compile/pr65873.c: New testcase. + 2015-05-12 Thomas Koenig PR fortran/66111 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr65873.c b/gcc/testsuite/gcc.c-torture/compile/pr65873.c new file mode 100644 index 00000000000..854f02c5f08 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr65873.c @@ -0,0 +1,14 @@ +typedef __SIZE_TYPE__ size_t; + +extern inline __attribute__ ((__always_inline__, __gnu_inline__, __artificial__, __nothrow__, __leaf__)) void * +memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len) +{ + return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0)); +} + +__attribute__((optimize ("Ofast"))) void +bar (void *d, void *s, size_t l) +{ + memcpy (d, s, l); +} +