* Go patch committed: Don't make GC symbol for invalid array type
@ 2015-08-12 17:21 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2015-08-12 17:21 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 270 bytes --]
This patch by Chris Manghane changes the Go frontend to not make a GC
symbol for an invalid array type. This avoids a compiler crash and
fixes https://golang.org/issue/11539 . Bootstrapped and ran Go
testsuite on x86_64-unknown-linux-gnu. Committed to mainline.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1042 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 226795)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-55175f7ee0db2c1e68423216d7744be80071ed6c
+5fc38e74d132cd6f4e7b56e6bcf9fe57031ab203
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: gcc/go/gofrontend/types.cc
===================================================================
--- gcc/go/gofrontend/types.cc (revision 226510)
+++ gcc/go/gofrontend/types.cc (working copy)
@@ -6423,7 +6423,10 @@ Array_type::array_gc_symbol(Gogo* gogo,
unsigned long bound;
if (!this->length_->numeric_constant_value(&nc)
|| nc.to_unsigned_long(&bound) == Numeric_constant::NC_UL_NOTINT)
- go_assert(saw_errors());
+ {
+ go_assert(saw_errors());
+ return;
+ }
Btype* pbtype = gogo->backend()->pointer_type(gogo->backend()->void_type());
int64_t pwidth = gogo->backend()->type_size(pbtype);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-12 17:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 17:21 Go patch committed: Don't make GC symbol for invalid array type 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).