public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Go patch committed: Update for mainline changes
@ 2013-11-19 15:30 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2013-11-19 15:30 UTC (permalink / raw)
  To: gcc-patches, gofrontend-dev; +Cc: dave

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

This patch to the Go frontend incorporates patches by Richard S and
Diego for changes to the middle-end.  These patches were already
committed to the GCC repository.  This change commits them to the master
Go repository.

Ian


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

diff -r 75537ee240ab go/expressions.cc
--- a/go/expressions.cc	Mon Nov 18 18:29:34 2013 -0800
+++ b/go/expressions.cc	Tue Nov 19 06:55:30 2013 -0800
@@ -11,6 +11,8 @@
 #include "toplev.h"
 #include "intl.h"
 #include "tree.h"
+#include "stringpool.h"
+#include "stor-layout.h"
 #include "gimple.h"
 #include "gimplify.h"
 #include "tree-iterator.h"
@@ -3343,9 +3345,9 @@
       tree int_type_tree = type_to_tree(int_type->get_backend(gogo));
 
       expr_tree = fold_convert(int_type_tree, expr_tree);
-      if (host_integerp(expr_tree, 0))
-	{
-	  HOST_WIDE_INT intval = tree_low_cst(expr_tree, 0);
+      if (tree_fits_shwi_p (expr_tree))
+	{
+	  HOST_WIDE_INT intval = tree_to_shwi (expr_tree);
 	  std::string s;
 	  Lex::append_char(intval, true, &s, this->location());
 	  Expression* se = Expression::make_string(s, this->location());
diff -r 75537ee240ab go/gogo-tree.cc
--- a/go/gogo-tree.cc	Mon Nov 18 18:29:34 2013 -0800
+++ b/go/gogo-tree.cc	Tue Nov 19 06:55:30 2013 -0800
@@ -8,6 +8,9 @@
 
 #include "toplev.h"
 #include "tree.h"
+#include "stringpool.h"
+#include "stor-layout.h"
+#include "varasm.h"
 #include "gimple.h"
 #include "gimplify.h"
 #include "tree-iterator.h"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-19 14:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-19 15:30 Go patch committed: Update for mainline changes 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).