diff options
author | Anthony Ramine <[email protected]> | 2014-03-01 17:26:56 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-03-05 10:18:15 +0100 |
commit | 926be4d0a3a75f48bc280a7aa2f97fc4adbef189 (patch) | |
tree | ce0074eeaffcfd38187cb9609471deb4242a0b44 /lib/compiler/test/core_SUITE.erl | |
parent | c199bd2923e7d733e60beb9bd27b3852cbb2e699 (diff) | |
download | otp-926be4d0a3a75f48bc280a7aa2f97fc4adbef189.tar.gz otp-926be4d0a3a75f48bc280a7aa2f97fc4adbef189.tar.bz2 otp-926be4d0a3a75f48bc280a7aa2f97fc4adbef189.zip |
Do not try to optimize non-boolean guards
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries
to optimize them, as this code is not quite really written by users, no attempt
to rewrite them more efficiently should be done, for simplicity's sake.
Reported-by: Ulf Norell
Diffstat (limited to 'lib/compiler/test/core_SUITE.erl')
-rw-r--r-- | lib/compiler/test/core_SUITE.erl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl index aa222c48de..428ad65364 100644 --- a/lib/compiler/test/core_SUITE.erl +++ b/lib/compiler/test/core_SUITE.erl @@ -24,7 +24,7 @@ dehydrated_itracer/1,nested_tries/1, seq_in_guard/1,make_effect_seq/1,eval_is_boolean/1, unsafe_case/1,nomatch_shadow/1,reversed_annos/1, - map_core_test/1,eval_case/1]). + map_core_test/1,eval_case/1,bad_boolean_guard/1]). -include_lib("test_server/include/test_server.hrl"). @@ -50,7 +50,7 @@ groups() -> [{p,test_lib:parallel(), [dehydrated_itracer,nested_tries,seq_in_guard,make_effect_seq, eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos, - map_core_test,eval_case + map_core_test,eval_case,bad_boolean_guard ]}]. @@ -77,6 +77,7 @@ end_per_group(_GroupName, Config) -> ?comp(reversed_annos). ?comp(map_core_test). ?comp(eval_case). +?comp(bad_boolean_guard). try_it(Mod, Conf) -> Src = filename:join(?config(data_dir, Conf), atom_to_list(Mod)), |