re PR go/78145 (Several go.test tests fail with error: integer constant overflow...
authorIan Lance Taylor <ian@gcc.gnu.org>
Tue, 1 Nov 2016 13:46:10 +0000 (13:46 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Tue, 1 Nov 2016 13:46:10 +0000 (13:46 +0000)
PR go/78145
    compiler: don't put print/println constants into temporaries

    It's not necessary, and it breaks setting their type to int64/uint64
    when appropriate.

    This fixes GCC PR 78145.

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

From-SVN: r241740

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/expressions.cc

index a03ed5852671551d5accd3479643a5e457094455..ace3c2f755095371845901fd673f0e75b1bd67d9 100644 (file)
@@ -1,4 +1,4 @@
-c353ffbe18d1538cac7f2a3fcefb846dbf1a6591
+919ef699fe56a9b40c2bd0df07ac1378ce4a7fab
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 4f850598ca02a7f7ec6c254b27d7aa5653b8b40c..69f4e016ba420c182298c2834b616f4d36bb213b 100644 (file)
@@ -7193,7 +7193,7 @@ Builtin_call_expression::do_lower(Gogo*, Named_object* function,
           pa != this->args()->end();
           ++pa)
        {
-         if (!(*pa)->is_variable())
+         if (!(*pa)->is_variable() && !(*pa)->is_constant())
            {
              Temporary_statement* temp =
                Statement::make_temporary(NULL, *pa, loc);