From 120aa71bca7c6b9de3e0abec3942e6012f4a80fd Mon Sep 17 00:00:00 2001 From: Stavros Aronis Date: Mon, 21 Mar 2011 18:39:25 +0200 Subject: Add small/bin_compr --- lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/dialyzer/test/small_SUITE_data/src/bin_compr.erl (limited to 'lib/dialyzer/test/small_SUITE_data/src') 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]. -- cgit v1.2.3