public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "H.J. Lu" <hjl@lucon.org>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: optimization/7145: g++ -O with structure initializer & return value optimization generates bad code
Date: Sat, 29 Jun 2002 07:15:00 -0000	[thread overview]
Message-ID: <20020629053601.10224.qmail@sources.redhat.com> (raw)

The following reply was made to PR optimization/7145; it has been noted by GNATS.

From: "H.J. Lu" <hjl@lucon.org>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, tlb@tlb.org,
	gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org?Subject=Re:,
	optimization/@lucon.org
Cc:  
Subject: Re: optimization/7145: g++ -O with structure initializer & return
 value optimization generates bad code
Date: Fri, 28 Jun 2002 22:27:33 -0700

 This is a multi-part message in MIME format.
 --------------020208010607060209080104
 Content-Type: text/plain; charset=us-ascii; format=flowed
 Content-Transfer-Encoding: 7bit
 
 How about this patch?
 
 H.J.
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7145 
 
 
 --------------020208010607060209080104
 Content-Type: text/plain;
  name="gcc-cpp-named.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="gcc-cpp-named.patch"
 
 2002-06-28  H.J. Lu  (hjl@gnu.org)
 
 	* typeck.c (check_return_expr): Don't set
 	current_function_return_value if DECL_INITIAL (retval) is not
 	NULL_TREE.
 
 --- gcc/cp/typeck.c.init	Fri Jun 21 00:36:03 2002
 +++ gcc/cp/typeck.c	Fri Jun 28 22:09:39 2002
 @@ -6559,6 +6559,7 @@ check_return_expr (retval)
  	  && (current_function_return_value == NULL_TREE
  	      || current_function_return_value == retval)
  	  && TREE_CODE (retval) == VAR_DECL
 +	  && DECL_INITIAL (retval) == NULL_TREE
  	  && DECL_CONTEXT (retval) == current_function_decl
  	  && ! TREE_STATIC (retval)
  	  && (DECL_ALIGN (retval)
 
 --------------020208010607060209080104--
 


             reply	other threads:[~2002-06-29  5:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-29  7:15 H.J. Lu [this message]
2002-06-29 22:06 tlb
2002-12-06 13:56 bangerth

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=20020629053601.10224.qmail@sources.redhat.com \
    --to=hjl@lucon.org \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /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).