diff options
author | Björn Gustavsson <bjorn@erlang.org> | 2015-02-19 16:55:18 +0100 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2015-02-20 10:10:51 +0100 |
commit | 7db06f86efea90df387501735dea39681a82d4ae (patch) | |
tree | 719e3c82ecc012f4ac587cf77d6d66a88073560f /lib/compiler/test/lc_SUITE.erl | |
parent | 7789de9b616a46f81195eadec26ff40b8306ecef (diff) | |
download | otp-7db06f86efea90df387501735dea39681a82d4ae.tar.gz otp-7db06f86efea90df387501735dea39681a82d4ae.tar.bz2 otp-7db06f86efea90df387501735dea39681a82d4ae.zip |
sys_core_fold: Fix non-tail-recursive list comprehensions
649d6e73 simplified opt_simple_let_2/6 a little bit too much,
so that some list comprehensions in effect context were not
properly tail-recursive.
Diffstat (limited to 'lib/compiler/test/lc_SUITE.erl')
-rw-r--r-- | lib/compiler/test/lc_SUITE.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl index 6c5b34498b..62bada1407 100644 --- a/lib/compiler/test/lc_SUITE.erl +++ b/lib/compiler/test/lc_SUITE.erl @@ -208,6 +208,17 @@ effect(Config) when is_list(Config) -> #{<<1:500>>:=V1,<<2:301>>:=V2} <- L], ok end, id([#{},x,#{<<1:500>>=>42,<<2:301>>=>{a,b,c}}])), + + %% Will trigger the time-trap timeout if not tail-recursive. + case ?MODULE of + lc_SUITE -> + _ = [{'EXIT',{badarg,_}} = + (catch binary_to_atom(<<C/utf8>>, utf8)) || + C <- lists:seq(16#10000, 16#FFFFF)]; + _ -> + ok + end, + ok. do_effect(Lc, L) -> |