re PR go/68477 (error: type variant differs by TYPE_STRING_FLAG.)
authorIan Lance Taylor <iant@google.com>
Tue, 1 Dec 2015 04:45:53 +0000 (04:45 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 1 Dec 2015 04:45:53 +0000 (04:45 +0000)
PR go/68477
* go-gcc.cc (Gcc_backend::string_constant_expression): Don't set
TYPE_STRING_FLAG on a variant type.

From-SVN: r231096

gcc/go/ChangeLog
gcc/go/go-gcc.cc

index 6ae73977ea8beaecadd5e825639a10651edbc146..1a120950a134ec3d66b177ee7244d59e56bdca83 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-30  Ian Lance Taylor  <iant@google.com>
+
+       PR go/68477
+       * go-gcc.cc (Gcc_backend::string_constant_expression): Don't set
+       TYPE_STRING_FLAG on a variant type.
+
 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
 
        * go-backend.c: Remove unused header files.
index 31aac2ec9ebe541f672cb9076bca8460df2fa2e7..cfb1995faf211ce7985fd440de09c22f461db3ed 100644 (file)
@@ -1279,7 +1279,6 @@ Gcc_backend::string_constant_expression(const std::string& val)
   tree const_char_type = build_qualified_type(unsigned_char_type_node,
                                              TYPE_QUAL_CONST);
   tree string_type = build_array_type(const_char_type, index_type);
-  string_type = build_variant_type_copy(string_type);
   TYPE_STRING_FLAG(string_type) = 1;
   tree string_val = build_string(val.length(), val.data());
   TREE_TYPE(string_val) = string_type;