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] PR middle-end/10472: __builtin_stpcpy RTL


 > From: Roger Sayle <roger@www.eyesopen.com>
 > 
 > Hi Kaveh (and reviewers),
 > The following patch fixes PR middle-end/10472 the ICE in
 > instantiate_virtual_regs_lossage on x86 with mainline.

Ah, excellent!  Thanks Roger. :-)


 > 2003-05-04  Roger Sayle  <roger@eyesopen.com>
 > 
 > 	PR middle-end/10472
 > 	* builtins.c (expand_builtin_memcpy):  Call force_operand on
 > 	expressions and use simplify_gen_binop to create the addition.

typo "binary"?---------------------------^^^^^


 > 	* gcc.c-torture/compile/20030504-1.c: New test case.
 > 
 > /* Test case from PR middle-end/10472  */
 > 
 > extern void f (char *);
 > 
 > void foo (char *s)
 > {
 >   f (__builtin_stpcpy (s, "hi"));


Perhaps just to be thorough, add a test call to mempcpy also?  I.e.

   f (__builtin_mempcpy (s, "hi", 3));

Can't hurt IMHO.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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