diff options
author | Björn Gustavsson <[email protected]> | 2014-01-20 10:51:09 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-01-20 10:51:09 +0100 |
commit | 80205afbd31a29e052416bd8c686b65fe06ea3f4 (patch) | |
tree | 84549d523e91dadfe5bae4c14f36f18ee7d9f150 /lib/compiler/test | |
parent | 7ba68e1dc45981a82ccec84d157699606d664431 (diff) | |
parent | e12b7d5331c58b41db06cadfa4af75b78b62a2b1 (diff) | |
download | otp-80205afbd31a29e052416bd8c686b65fe06ea3f4.tar.gz otp-80205afbd31a29e052416bd8c686b65fe06ea3f4.tar.bz2 otp-80205afbd31a29e052416bd8c686b65fe06ea3f4.zip |
Merge branch 'bjorn/compiler/optimizations/OTP-11584'
* bjorn/compiler/optimizations/OTP-11584:
Generalize optimizations of case statements
Ignore warnings when running sys_core_fold after inlining
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/core_fold_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/warnings_SUITE.erl | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl index a5a4e62a42..69f61a046f 100644 --- a/lib/compiler/test/core_fold_SUITE.erl +++ b/lib/compiler/test/core_fold_SUITE.erl @@ -249,6 +249,12 @@ coverage(Config) when is_list(Config) -> case list_to_pid("<0.42.0>") of Pid when is_pid(Pid) -> ok end, + + %% Cover the non-variable case in bsm_do_an/4. + ok = bsm_an_inlined(<<1>>, Config), + error = bsm_an_inlined(<<1,2,3>>, Config), + error = bsm_an_inlined([], Config), + ok. cover_will_match_list_type(A) -> @@ -290,6 +296,9 @@ cover_is_safe_bool_expr(X) -> false end. +bsm_an_inlined(<<_:8>>, _) -> ok; +bsm_an_inlined(_, _) -> error. + id(I) -> I. unused_multiple_values_error(Config) when is_list(Config) -> diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl index 810b2b48c9..7186956603 100644 --- a/lib/compiler/test/warnings_SUITE.erl +++ b/lib/compiler/test/warnings_SUITE.erl @@ -117,6 +117,7 @@ pattern2(Config) when is_list(Config) -> Source, [nowarn_unused_vars], {warnings,[{2,sys_core_fold,{nomatch_shadow,1}}, + {4,sys_core_fold,no_clause_match}, {5,sys_core_fold,nomatch_clause_type}, {6,sys_core_fold,nomatch_clause_type}]}}], ?line [] = run(Config, Ts), |