diff options
author | Björn Gustavsson <[email protected]> | 2015-01-16 09:16:36 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-16 09:16:36 +0100 |
commit | 393f065ccdb9fc318b89893c303b428210c974ab (patch) | |
tree | 2a92cf2d52ce38a0026326a927173ebcbee464cf /lib/compiler/test/guard_SUITE.erl | |
parent | bbea5be67137f5425ab08805b070e31a9df19605 (diff) | |
parent | 971fc7b39934e9d3e0927d95c45bea6ad7e90566 (diff) | |
download | otp-393f065ccdb9fc318b89893c303b428210c974ab.tar.gz otp-393f065ccdb9fc318b89893c303b428210c974ab.tar.bz2 otp-393f065ccdb9fc318b89893c303b428210c974ab.zip |
Merge branch 'bjorn/compiler/beam_bool/OTP-12410' into maint
* bjorn/compiler/beam_bool/OTP-12410:
beam_bool: Correct live calculation for GC BIFs
beam_bool: Correct indentation for try...catch
Diffstat (limited to 'lib/compiler/test/guard_SUITE.erl')
-rw-r--r-- | lib/compiler/test/guard_SUITE.erl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl index eb205d09a7..34bfdeb1e5 100644 --- a/lib/compiler/test/guard_SUITE.erl +++ b/lib/compiler/test/guard_SUITE.erl @@ -1556,6 +1556,24 @@ bad_constants(Config) when is_list(Config) -> bad_guards(Config) when is_list(Config) -> if erlang:float(self()); true -> ok end, + + fc(catch bad_guards_1(1, [])), + fc(catch bad_guards_1(1, [2])), + fc(catch bad_guards_1(atom, [2])), + + fc(catch bad_guards_2(#{a=>0,b=>0}, [])), + fc(catch bad_guards_2(#{a=>0,b=>0}, [x])), + fc(catch bad_guards_2(not_a_map, [x])), + fc(catch bad_guards_2(42, [x])), + ok. + +%% beam_bool used to produce GC BIF instructions whose +%% Live operands included uninitialized registers. + +bad_guards_1(X, [_]) when {{X}}, -X -> + ok. + +bad_guards_2(M, [_]) when M#{a := 0, b => 0}, map_size(M) -> ok. %% Call this function to turn off constant propagation. |