This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pass_stdarg problem when run after pass_lim
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Michael Matz <matz at suse dot de>
- Cc: Tom de Vries <Tom_deVries at mentor dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Tue, 3 Feb 2015 14:41:09 +0100
- Subject: Re: pass_stdarg problem when run after pass_lim
- Authentication-results: sourceware.org; auth=none
- References: <54CA6BB1 dot 10502 at mentor dot com> <20150129172535 dot GN1746 at tucnak dot redhat dot com> <54CAB232 dot 1090005 at mentor dot com> <CAFiYyc1XB_6-P32CroiFbE2Of3j3vORu5d7ALuEgoN8F9yk0Tg at mail dot gmail dot com> <54CB61C8 dot 4060801 at mentor dot com> <alpine dot LNX dot 2 dot 00 dot 1501301322400 dot 18611 at wotan dot suse dot de> <54CF8AB8 dot 5040405 at mentor dot com> <alpine dot LNX dot 2 dot 00 dot 1502021628300 dot 18611 at wotan dot suse dot de> <54D0979A dot 8030200 at mentor dot com> <alpine dot LNX dot 2 dot 00 dot 1502031434250 dot 18611 at wotan dot suse dot de>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 03, 2015 at 02:36:53PM +0100, Michael Matz wrote:
> Hi,
>
> On Tue, 3 Feb 2015, Tom de Vries wrote:
>
> > Ironically, that fix breaks the va_list_gpr/fpr_size optimization, so
> > I've disabled that by default for now.
> >
> > I've done a non-bootstrap and bootstrap build using all languages.
> >
> > The non-bootstrap test shows (at least) two classes of real failures:
> > - gcc.c-torture/execute/20020412-1.c, gcc.target/i386/memcpy-strategy-4.c and
> > gcc.dg/lto/20090706-1_0.c.
> > These are test-cases with vla as va_arg argument. It ICEs in
> > force_constant_size with call stack
> > gimplify_va_arg_expr -> create_tmp_var -> gimple_add_tmp_var ->
> > force_constant_size
>
> Hah, yeah, that's the issue I remembered with create_tmp_var. This needs
> a change in how to represent the va_arg "call", because the LHS can't be a
> temporary that's copied to the real LHS afterwards.
It can be lowered during gimplification to some internal call. What
arguments and return values will it have can be decided based on what will
be most suitable for the lowering.
Jakub