compiler: don't write sink constants to C header file
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 25 Jan 2018 15:10:03 +0000 (15:10 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 25 Jan 2018 15:10:03 +0000 (15:10 +0000)
    Reviewed-on: https://go-review.googlesource.com/89815

From-SVN: r257049

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/gogo.cc

index 0430961f7bcec93ddf0ab81d15f8321c39c10a21..e55b2bcfc6cece78fcebc3ee831f1f4a9e791844 100644 (file)
@@ -1,4 +1,4 @@
-0bbc03f81c862fb35be3edee9824698a7892a17e
+016ea21c4cba324c6ea6424da7988c6f985e671b
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 83be6176ae7e04e63aed9585b0a548f96f07f8a6..f89099e7e7f437486ef578459baf18a3d040b730 100644 (file)
@@ -4633,7 +4633,9 @@ Gogo::write_c_header()
 
       if (no->is_type() && no->type_value()->struct_type() != NULL)
        types.push_back(no);
-      if (no->is_const() && no->const_value()->type()->integer_type() != NULL)
+      if (no->is_const()
+         && no->const_value()->type()->integer_type() != NULL
+         && !no->const_value()->is_sink())
        {
          Numeric_constant nc;
          unsigned long val;