File 0785-Cover-beam_ssa_opt-opt_ssa_sink-1.patch of Package erlang

From 8655f46177a47e6565629f6fa3ce9c86a2dc8892 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= <bjorn@erlang.org>
Date: Mon, 14 Oct 2019 11:53:10 +0200
Subject: [PATCH 3/3] Cover beam_ssa_opt:opt_ssa_sink/1

---
 lib/compiler/test/receive_SUITE.erl | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl
index 49a57cd1ff..f9f59207c8 100644
--- a/lib/compiler/test/receive_SUITE.erl
+++ b/lib/compiler/test/receive_SUITE.erl
@@ -135,6 +135,11 @@ coverage(Config) when is_list(Config) ->
 
     {'EXIT',{{badmap,[]},_}} = (catch monitor_plus_badmap(self())),
 
+
+    self() ! {data,no_data},
+    ok = receive_sink_tuple({any,pattern}),
+    {b,a} = receive_sink_tuple({a,b}),
+
     ok.
 
 monitor_plus_badmap(Pid) ->
@@ -183,6 +188,16 @@ tuple_to_values(Timeout, X) ->
 	    end,
     A+B.
 
+%% Cover a help function for beam_ssa_opt:ssa_opt_sink/1.
+receive_sink_tuple({Line,Pattern}) ->
+    receive
+        {data,_} ->
+            ok
+    after 1 ->
+            id({Pattern,Line})
+    end.
+
+
 %% OTP-7980. Thanks to Vincent de Phily. The following code would
 %% be inccorrectly optimized by beam_jump.
 
-- 
2.16.4

openSUSE Build Service is sponsored by