public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Michael Matz <matz@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: RFC: explicitely mark out-of-scope deaths
Date: Thu, 26 May 2011 15:07:00 -0000	[thread overview]
Message-ID: <20110526140015.GX17079@tyan-ft48-01.lab.bos.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105261516240.9668@wotan.suse.de>

On Thu, May 26, 2011 at 03:43:45PM +0200, Michael Matz wrote:
> --- tree-stdarg.c.orig	2011-05-26 14:15:01.000000000 +0200
> +++ tree-stdarg.c	2011-05-26 14:15:41.000000000 +0200
> @@ -872,8 +872,12 @@ execute_optimize_stdarg (void)
>  		  if (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))
>  		      == GIMPLE_SINGLE_RHS)
>  		    {
> +		      /* Check for ap ={v} {}.  */
> +		      if (TREE_CODE (rhs) == CONSTRUCTOR
> +			       && TREE_THIS_VOLATILE (rhs))
> +			continue;
>  		      /* Check for ap[0].field = temp.  */
> -		      if (va_list_counter_struct_op (&si, lhs, rhs, true))
> +		      else if (va_list_counter_struct_op (&si, lhs, rhs, true))
>  			continue;

Perhaps optimize_stdarg_builtin could fold __builtin_va_end into
this ap ={v} {} for non-pointer va_list to make it clear the variable
is undefined afterwards, currently it just optimizes it away completely.

	Jakub

  reply	other threads:[~2011-05-26 14:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-26 14:30 Michael Matz
2011-05-26 15:07 ` Jakub Jelinek [this message]
2011-05-26 15:17   ` Richard Guenther
2011-05-26 17:38 ` Steven Bosscher
2011-05-27 15:44   ` Michael Matz
2011-05-27 15:49     ` Jakub Jelinek
2011-05-27 16:45       ` Michael Matz
2011-05-26 23:49 ` Martin Jambor
2011-05-27 13:24   ` Michael Matz
2011-06-01  9:25 ` Richard Sandiford
2011-06-01  9:44   ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110526140015.GX17079@tyan-ft48-01.lab.bos.redhat.com \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=matz@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).