aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-03-21 18:39:25 +0200
committerHenrik Nord <[email protected]>2011-05-04 15:06:16 +0200
commit120aa71bca7c6b9de3e0abec3942e6012f4a80fd (patch)
tree51e2292053bc9f6aeff991d0b09f0b1792aedeaf /lib
parentc69947da87a5f8b1f1ec6020b2623ce4614c5217 (diff)
downloadotp-120aa71bca7c6b9de3e0abec3942e6012f4a80fd.tar.gz
otp-120aa71bca7c6b9de3e0abec3942e6012f4a80fd.tar.bz2
otp-120aa71bca7c6b9de3e0abec3942e6012f4a80fd.zip
Add small/bin_compr
Diffstat (limited to 'lib')
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl b/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl
new file mode 100644
index 0000000000..8c2497ed21
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl
@@ -0,0 +1,16 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%------------------------------------------------------------------------
+%%% File : bin_compr.erl
+%%% Purpose : Test case which crashes in dialyzer_dataflow:bind_bin_segs/5.
+%%%------------------------------------------------------------------------
+
+-module(bin_compr).
+
+-export([bc/1]).
+
+%% The binary comprehension below is stupid: it consumes the whole
+%% bitstr in one go and produces a [666] result provided Bits is a
+%% bitstr of at least 8 bits. Still, this is a valid Erlang program
+%% and dialyzer's analysis should not crash on it.
+bc(Bits) ->
+ [666 || <<_:8/integer, _/bits>> <= Bits].