This patch to the Go frontend changes
Builtin_call_expression::do_numeric_constant_value to accept an
argument of abstract type.  This is because it can be called by
Array_type::verify_length before the determine types pass.  The test
case for this is https://golang.org/cl/147537.  This fixes
http://golang.org/issue/28601.  Bootstrapped and ran Go testsuite on
x86_64-pc-linux-gnu.  Committed to mainline and to GCC 7 and 8
branches.

Ian
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE     (revision 265710)
+++ gcc/go/gofrontend/MERGE     (working copy)
@@ -1,4 +1,4 @@
-df841cce9fd271a25269e3514c2e9b61deaf2c4c
+5fcfe352ad91945a4f4d0dcfb6309df9bd072c7d
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
Index: gcc/go/gofrontend/expressions.cc
===================================================================
--- gcc/go/gofrontend/expressions.cc    (revision 265710)
+++ gcc/go/gofrontend/expressions.cc    (working copy)
@@ -8294,7 +8294,7 @@ Builtin_call_expression::do_numeric_cons
       if (arg_type->is_error())
        return false;
       if (arg_type->is_abstract())
-       return false;
+       arg_type = arg_type->make_non_abstract_type();
       if (this->seen_)
         return false;
 

Reply via email to