diff options
author | Björn Gustavsson <[email protected]> | 2016-08-12 12:12:34 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-08-12 12:12:34 +0200 |
commit | 240846e5dc852eb6af7e2047d1dd757960780244 (patch) | |
tree | 520a804f9edf22e79470367cc88e816ffc481839 /lib/compiler/test | |
parent | 451ca8e5ca10892342ee8627de7ea961a8f06df2 (diff) | |
parent | ce260c34b555e9e2d74fe9491e9e3a20cfcd6c82 (diff) | |
download | otp-240846e5dc852eb6af7e2047d1dd757960780244.tar.gz otp-240846e5dc852eb6af7e2047d1dd757960780244.tar.bz2 otp-240846e5dc852eb6af7e2047d1dd757960780244.zip |
Merge branch 'maint'
* maint:
asn1_test_lib: Compile ASN.1 modules in parallel
Support 'make -j' when compiling ASN.1 modules
[ERL-209] Fix ambiguous_catch_try_state inconsistency error
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/beam_jump_SUITE.erl | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_jump_SUITE.erl b/lib/compiler/test/beam_jump_SUITE.erl index 0b13adaff2..088f63606c 100644 --- a/lib/compiler/test/beam_jump_SUITE.erl +++ b/lib/compiler/test/beam_jump_SUITE.erl @@ -21,7 +21,7 @@ -export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1, init_per_group/2,end_per_group/2, - undefined_label/1]). + undefined_label/1,ambiguous_catch_try_state/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. @@ -32,7 +32,8 @@ all() -> groups() -> [{p,[parallel], - [undefined_label + [undefined_label, + ambiguous_catch_try_state ]}]. init_per_suite(Config) -> @@ -57,3 +58,17 @@ flights(0, [], []) when [], 0; 0.0, [], false -> clark; flights(_, Reproduction, introduction) when false, Reproduction -> responsible. + +%% [ERL-209] beam_jump would share 'catch' blocks, causing an +%% ambiguous_catch_try_state error in beam_validator. + +ambiguous_catch_try_state(_Config) -> + {{'EXIT',{{case_clause,song},_}},{'EXIT',{{case_clause,song},_}}} = + checks(42), + ok. + +river() -> song. + +checks(Wanted) -> + %% Must be one line to cause the unsafe optimization. + {catch case river() of sheet -> begin +Wanted, if "da" -> Wanted end end end, catch case river() of sheet -> begin + Wanted, if "da" -> Wanted end end end}. |