This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR64979: S/390: Fix setup of overflow area pointer in va_start
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 09 Feb 2015 12:40:05 +0100
- Subject: Re: [PATCH] PR64979: S/390: Fix setup of overflow area pointer in va_start
- Authentication-results: sourceware.org; auth=none
- References: <20150209095034 dot GA32189 at maggie> <20150209112904 dot GW1746 at tucnak dot redhat dot com>
On 02/09/2015 12:29 PM, Jakub Jelinek wrote:
> On Mon, Feb 09, 2015 at 10:50:34AM +0100, Andreas Krebbel wrote:
>> Hi,
>>
>> the attached patch fixes a critical problem in the va_start expansion
>> code in the S/390 backend. The problem exists since GCC 4.0.
>>
>> Ok to commit to 4.9 branch and mainline?
>
> No. This isn't a backend problem, but a bug in the tree-stdarg.c pass,
> so should be fixed there, for all targets, rather than just worked around by
> pessimizing unnecessarily one target.
I think for the overflow area pointer we would need a different flag indicating whether a pointer to
the va_list structure escapes or not. To my understanding it is not correct to only use the
va_list_gpr_size/va_list_fpr_size fields for that purpose. These only refer to the va_arg expansions
in the current function.
Other backends rs6000/i386 unconditionally set up the overflow area pointer.
-Andreas-