diff options
Diffstat (limited to 'lib/compiler/test/andor_SUITE.erl')
-rw-r--r-- | lib/compiler/test/andor_SUITE.erl | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl index 250f2c5803..cf7e326f11 100644 --- a/lib/compiler/test/andor_SUITE.erl +++ b/lib/compiler/test/andor_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2001-2021. All Rights Reserved. +%% Copyright Ericsson AB 2001-2023. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -209,8 +209,14 @@ t_and_or(Config) when is_list(Config) -> {'EXIT',{badarg,_}} = (catch true and Tuple) end, + %% Cover code in beam_ssa_codegen when type optimizations are disabled. + {'EXIT',{badarg,_}} = catch bad_and(true), + ok. +bad_and(A) -> + (not not ok) and id(A). + t_andalso(Config) when is_list(Config) -> Bs = [true,false], Ps = [{X,Y} || X <- Bs, Y <- Bs], @@ -245,6 +251,9 @@ t_andalso(Config) when is_list(Config) -> %% Cover conversion to right associativity. true = (is_list(Config) andalso is_list(Bs)) andalso is_list(Ps), + %% Cover beam_ssa_dead:will_succeed_vars/4. + false = fun(V) -> V == V andalso not (V == V) end(a), + ok. t_orelse(Config) when is_list(Config) -> |