This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Optimize (void) stpcpy (s1, s2) and (void) mempcpy (s1, s2)


On Mon, May 05, 2003 at 09:12:46AM -0700, Zack Weinberg wrote:
> > 	* gcc.c-torture/execute/string-opt-18.c (main): Add 3 new tests.
> 
> this doesn't appear to test that the optimization actually happens,
> can you work out a test that does?

It does. If this optimization doesn't happen, stpcpy (resp. mempcpy)
function is called as opposed to strcpy/memcpy.
The test  #ifdef __OPTIMIZE__ provides implementation for stpcpy/mempcpy
which simply abort.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]