diff options
author | John Högberg <[email protected]> | 2019-08-07 14:00:09 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2019-08-07 16:47:25 +0200 |
commit | 6ae9975689858d0e0c9af0a36869c012bb3762c0 (patch) | |
tree | 973ca6e2ad428001d6e3a0ce30fa18ef574b4933 /lib/compiler/test | |
parent | db8a1822079b309075dd5be9fa1cb2019da2c61d (diff) | |
download | otp-6ae9975689858d0e0c9af0a36869c012bb3762c0.tar.gz otp-6ae9975689858d0e0c9af0a36869c012bb3762c0.tar.bz2 otp-6ae9975689858d0e0c9af0a36869c012bb3762c0.zip |
compiler: Fix awkward match context substitution
This worked out by accident since codegen never actually looks at
the arguments for 'succeeded'; it just assumes that they reference
the preceding instruction.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index eb60dc049d..20fadc4fdb 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -274,14 +274,34 @@ silly_coverage(Config) when is_list(Config) -> bad_ssa_lint_input() -> {b_module,#{},t, - [{foobar,1},{module_info,0},{module_info,1}], + [{a,1},{b,1},{c,1},{module_info,0},{module_info,1}], [], [{b_function, - #{func_info => {t,foobar,1},location => {"t.erl",4}}, + #{func_info => {t,a,1},location => {"t.erl",4}}, [{b_var,0}], #{0 => {b_blk,#{},[],{b_ret,#{},{b_var,'@undefined_var'}}}}, 3}, {b_function, + #{func_info => {t,b,1},location => {"t.erl",5}}, + [{b_var,0}], + #{0 => + {b_blk,#{}, + [{b_set,#{},{b_var,'@first_var'},first_op,[]}, + {b_set,#{},{b_var,'@second_var'},second_op,[]}, + {b_set,#{},{b_var,'@ret'},succeeded,[{b_var,'@first_var'}]}], + {b_ret,#{},{b_var,'@ret'}}}}, + 3}, + {b_function, + #{func_info => {t,c,1},location => {"t.erl",6}}, + [{b_var,0}], + #{0 => + {b_blk,#{}, + [{b_set,#{},{b_var,'@first_var'},first_op,[]}, + {b_set,#{},{b_var,'@ret'},succeeded,[{b_var,'@first_var'}]}, + {b_set,#{},{b_var,'@second_var'},second_op,[]}], + {b_ret,#{},{b_var,'@ret'}}}}, + 3}, + {b_function, #{func_info => {t,module_info,0}}, [], #{0 => |