aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/beam_validator_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-26 09:55:24 +0100
committerGitHub <[email protected]>2018-01-26 09:55:24 +0100
commit5b58d9e2d3262160b7f10d8b6798f89f0618c5f6 (patch)
tree1417fc360392bdd3d3599e0aae1723090286bd14 /lib/compiler/test/beam_validator_SUITE.erl
parent8486a42bb30d6bed00842a3fa9046491ee520010 (diff)
parente7b49a3e657e1bd7bbf92050e6360b1e0f142a1e (diff)
downloadotp-5b58d9e2d3262160b7f10d8b6798f89f0618c5f6.tar.gz
otp-5b58d9e2d3262160b7f10d8b6798f89f0618c5f6.tar.bz2
otp-5b58d9e2d3262160b7f10d8b6798f89f0618c5f6.zip
Merge pull request #1691 from bjorng/bjorn/compiler/local-cse
Do local common sub expression elimination (CSE)
Diffstat (limited to 'lib/compiler/test/beam_validator_SUITE.erl')
-rw-r--r--lib/compiler/test/beam_validator_SUITE.erl20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl
index 685eb2a72e..63a13281a8 100644
--- a/lib/compiler/test/beam_validator_SUITE.erl
+++ b/lib/compiler/test/beam_validator_SUITE.erl
@@ -33,8 +33,8 @@
state_after_fault_in_catch/1,no_exception_in_catch/1,
undef_label/1,illegal_instruction/1,failing_gc_guard_bif/1,
map_field_lists/1,cover_bin_opt/1,
- val_dsetel/1]).
-
+ val_dsetel/1,bad_tuples/1]).
+
-include_lib("common_test/include/ct.hrl").
init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) ->
@@ -61,7 +61,8 @@ groups() ->
freg_state,bad_bin_match,bad_dsetel,
state_after_fault_in_catch,no_exception_in_catch,
undef_label,illegal_instruction,failing_gc_guard_bif,
- map_field_lists,cover_bin_opt,val_dsetel]}].
+ map_field_lists,cover_bin_opt,val_dsetel,
+ bad_tuples]}].
init_per_suite(Config) ->
Config.
@@ -509,6 +510,19 @@ destroy_reg({Tag,N}) ->
{y,N+1}
end.
+bad_tuples(Config) ->
+ Errors = do_val(bad_tuples, Config),
+ [{{bad_tuples,heap_overflow,1},
+ {{put,{x,0}},8,{heap_overflow,{left,0},{wanted,1}}}},
+ {{bad_tuples,long,2},
+ {{put,{atom,too_long}},8,not_building_a_tuple}},
+ {{bad_tuples,self_referential,1},
+ {{put,{x,1}},7,{tuple_in_progress,{x,1}}}},
+ {{bad_tuples,short,1},
+ {{move,{x,1},{x,0}},7,{tuple_in_progress,{x,1}}}}] = Errors,
+
+ ok.
+
%%%-------------------------------------------------------------------------
transform_remove(Remove, Module) ->