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: Roger Sayle <roger at www dot eyesopen dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 May 2003 20:01:17 -0600 (MDT)
- Subject: Re: middle-end/10472: [3.4 regression] ICE in instantiate_virtual_regs_lossage
> 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 it might help if you either build the new arglist yourself
for the call to expand_builtin_memcpy, or avoid the intrinsic
falling back to a stpcpy library call, by using build_function_call_expr
as is done in expand_builtin_strcpy [the only other use of chainon
I hope this helps. I'm not sure if it'll fix the PR regression,
but it certainly is a potential bug.
Roger Sayle, E-mail: firstname.lastname@example.org
OpenEye Scientific Software, WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road, Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507. Fax: (+1) 505-473-0833