compiler: handle unsafe conversion expression in escape analysis
authorIan Lance Taylor <ian@gcc.gnu.org>
Wed, 28 Aug 2019 18:45:45 +0000 (18:45 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Wed, 28 Aug 2019 18:45:45 +0000 (18:45 +0000)
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/192037

From-SVN: r275000

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/escape.cc

index f596a6988400e42f53a6731667230922c0186960..54a5935577b6bfc86b5d6096ac7f5ed40bd1b74a 100644 (file)
@@ -1,4 +1,4 @@
-189ff44b2c26f29f41f0eb159e0d8f3fa508ecae
+5d15923ada640befb236d5fe94f0c724e98e99d7
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
index 4cfb48021f8338a303bb72889f14e19419d5523e..db3afc787d12d0d2b405235f0e22f5d575f46b08 100644 (file)
@@ -1706,6 +1706,15 @@ Escape_analysis_assign::expression(Expression** pexpr)
       }
       break;
 
+    case Expression::EXPRESSION_UNSAFE_CONVERSION:
+      {
+        Unsafe_type_conversion_expression* uce =
+          (*pexpr)->unsafe_conversion_expression();
+        Node* expr_node = Node::make_node(uce->expr());
+        this->assign(n, expr_node);
+      }
+      break;
+
     case Expression::EXPRESSION_FIXED_ARRAY_CONSTRUCTION:
     case Expression::EXPRESSION_SLICE_CONSTRUCTION:
       {