public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch RFA: Fix taking the address of a field of a local variable
@ 2012-06-07  8:12 Ian Lance Taylor
  2012-06-11  9:02 ` Richard Guenther
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Lance Taylor @ 2012-06-07  8:12 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

[-- Attachment #1: Type: text/plain, Size: 434 bytes --]

This patch to the Go compiler fixes the case of taking the address of a
field of a local variable.  Previously taking the address of the field
was not treated as taking the address of the variable.  But, of course,
it is.  This patch fixes the problem.  Bootstrapped and ran Go testsuite
on x86_64-unknown-linux-gnu.  Committed to mainline.

OK for 4.7 branch?  This is a real bug, bad runtime code generated for
valid Go code.

Ian


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 379 bytes --]

diff -r 784c72ffe147 go/expressions.h
--- a/go/expressions.h	Wed Jun 06 23:30:08 2012 -0700
+++ b/go/expressions.h	Thu Jun 07 01:03:20 2012 -0700
@@ -1888,6 +1888,10 @@
   do_is_addressable() const
   { return this->expr_->is_addressable(); }
 
+  void
+  do_address_taken(bool escapes)
+  { this->expr_->address_taken(escapes); }
+
   tree
   do_get_tree(Translate_context*);
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Go patch RFA: Fix taking the address of a field of a local variable
  2012-06-07  8:12 Go patch RFA: Fix taking the address of a field of a local variable Ian Lance Taylor
@ 2012-06-11  9:02 ` Richard Guenther
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2012-06-11  9:02 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc-patches, gofrontend-dev

On Thu, Jun 7, 2012 at 10:08 AM, Ian Lance Taylor <iant@google.com> wrote:
> This patch to the Go compiler fixes the case of taking the address of a
> field of a local variable.  Previously taking the address of the field
> was not treated as taking the address of the variable.  But, of course,
> it is.  This patch fixes the problem.  Bootstrapped and ran Go testsuite
> on x86_64-unknown-linux-gnu.  Committed to mainline.
>
> OK for 4.7 branch?  This is a real bug, bad runtime code generated for
> valid Go code.

Ok for 4.7.2, thus after 4.7.1 has been released.

Thanks,
Richard.

> Ian
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-11  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-07  8:12 Go patch RFA: Fix taking the address of a field of a local variable Ian Lance Taylor
2012-06-11  9:02 ` Richard Guenther

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).