public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed
@ 2015-07-23 20:31 Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2015-07-23 20:31 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This patch from Chris Manghane makes empty interface types for
variables at parse time when there are no methods.  This is normally
cleaned up later, but for sink variables that clean up never happens
and we get an internal compiler error.  This fixes
https://golang.org/issue/11579.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 1006 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 226122)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-b4a932b4a51b612cadcec93a83f94d6ee7d7d190
+cbb27e8089e11094a20502e53ef69c9c36955f85
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/parse.cc
===================================================================
--- gcc/go/gofrontend/parse.cc	(revision 225750)
+++ gcc/go/gofrontend/parse.cc	(working copy)
@@ -1225,7 +1225,11 @@ Parse::interface_type(bool record)
       methods = NULL;
     }
 
-  Interface_type* ret = Type::make_interface_type(methods, location);
+  Interface_type* ret;
+  if (methods == NULL)
+    ret = Type::make_empty_interface_type(location);
+  else
+    ret = Type::make_interface_type(methods, location);
   if (record)
     this->gogo_->record_interface_type(ret);
   return ret;

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

* Go patch committed
@ 2016-08-10 18:56 Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2016-08-10 18:56 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev; +Cc: mpolacek

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

This patch to the Go frontend by Marek Polacek fixes one missing break
statement and adds a couple of "fall through" comments to fix the Go
frontend for -Wimplicit-fallthrough.  Committed to mainline.

Ian

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1473 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 239315)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-8da2129a005cc1f44d4d993b0b7312b64c0d68a4
+5e05b7bc947231b4d5a8327bf63e2fa648e51dc7
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/escape.cc
===================================================================
--- gcc/go/gofrontend/escape.cc	(revision 239140)
+++ gcc/go/gofrontend/escape.cc	(working copy)
@@ -281,6 +281,7 @@ Node::op_format() const
 		{
 		case Runtime::PANIC:
 		  op << "panic";
+		  break;
 
 		case Runtime::APPEND:
 		  op << "append";
@@ -1923,6 +1924,7 @@ Escape_analysis_assign::assign(Node* dst
 	    if (!e->type()->has_pointer())
 	      break;
 	  }
+	  // Fall through.
 
 	case Expression::EXPRESSION_CONVERSION:
 	case Expression::EXPRESSION_TYPE_GUARD:
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc	(revision 239095)
+++ gcc/go/gofrontend/expressions.cc	(working copy)
@@ -5767,6 +5767,7 @@ Binary_expression::do_get_backend(Transl
     case OPERATOR_DIV:
       if (left_type->float_type() != NULL || left_type->complex_type() != NULL)
         break;
+      // Fall through.
     case OPERATOR_MOD:
       is_idiv_op = true;
       break;

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

* Go patch committed
@ 2015-07-23 19:55 Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2015-07-23 19:55 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev

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

This patch from Chris Manghane avoids a compiler crash for some kinds
of invalid code.  This is http://golang.org/issue/11592 .
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian

[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 902 bytes --]

Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE	(revision 226009)
+++ gcc/go/gofrontend/MERGE	(working copy)
@@ -1,4 +1,4 @@
-5c49a77455f52ba2c7eddb5b831456dc1c67b02f
+b4a932b4a51b612cadcec93a83f94d6ee7d7d190
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc	(revision 226007)
+++ gcc/go/gofrontend/expressions.cc	(working copy)
@@ -3955,6 +3955,8 @@ Unary_expression::do_check_types(Gogo*)
       // Indirecting through a pointer.
       if (type->points_to() == NULL)
 	this->report_error(_("expected pointer"));
+      if (type->points_to()->is_error())
+	this->set_is_error();
       break;
 
     default:

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

end of thread, other threads:[~2016-08-10 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-23 20:31 Go patch committed Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2016-08-10 18:56 Ian Lance Taylor
2015-07-23 19:55 Ian Lance Taylor

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