compiler: don't make map zero value constant
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 30 Nov 2017 05:03:29 +0000 (05:03 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 30 Nov 2017 05:03:29 +0000 (05:03 +0000)
    The map zero value is a common symbol, and it doesn't really make
    sense to have a constant common symbol. Current GCC has started to
    reject this case, probably as part of the fix for PR 83100.

    Reviewed-on: https://go-review.googlesource.com/80877

From-SVN: r255266

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/types.cc

index 8141a4efa691322793deb93edc29cc2f6336ef74..9aee310c9b8164543f0c531a2ff2ede02f01dad2 100644 (file)
@@ -1,4 +1,4 @@
-57adb928c3cc61ac8fa47554394670a1c455afc2
+0d6b3abcbfe04949db947081651a503ceb12fe6e
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 247f40a520258b388465979c4125a79e69e3ca6b..2c8d1437040e32b8d0f53a2d00f3cac89af6b618 100644 (file)
@@ -7717,10 +7717,10 @@ Map_type::backend_zero_value(Gogo* gogo)
   std::string asm_name(go_selectively_encode_id(zname));
   Bvariable* zvar =
       gogo->backend()->implicit_variable(zname, asm_name,
-                                         barray_type, false, true, true,
-                                      Map_type::zero_value_align);
+                                         barray_type, false, false, true,
+                                        Map_type::zero_value_align);
   gogo->backend()->implicit_variable_set_init(zvar, zname, barray_type,
-                                             false, true, true, NULL);
+                                             false, false, true, NULL);
   return zvar;
 }