This is the mail archive of the
mailing list for the GCC project.
Re: middle-end/10472: [3.4 regression] ICE in instantiate_virtual_regs_lossage
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: roger at www dot eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 2 May 2003 10:52:48 -0400 (EDT)
- Subject: Re: middle-end/10472: [3.4 regression] ICE in instantiate_virtual_regs_lossage
- References: <Pine.LNX.firstname.lastname@example.org>
> From: Roger Sayle <email@example.com>
> Hi Kaveh,
> > Would someone please assist me in debugging this?
> The first thing that strikes me as dangerous is the use of "chainon"
> in expand_builtin_stpcpy. The use of chainon is modifying the tree
> "arglist" that's passed in as a parameter. This argument list may
> be shared if the call was duplicated, and worse still if the call
> to expand_builtin_memcpy returns NULL, GCC will end up passing the
> wrong number of arguments in an explicit function call to the
> stpcpy library function.
I *think* that expand_builtin_memcpy will never return NULL here given
the validation we've already done before calling it from
expand_builtin_stpcpy. However for other reasons, it's better to be
safe and copy the arglist. I've submitted a patch to that effect, but
it doesn't help with the PR.
Since builtin mempcpy produces the same symptoms and doesn't modify
the arglist, I'm still convinced this bug is something in the x86
backend that interacts wierdly with these builtins.
Kaveh R. Ghazi firstname.lastname@example.org