aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2014-03-06 10:56:59 +0100
committerBjörn Gustavsson <[email protected]>2014-03-06 10:56:59 +0100
commitff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9 (patch)
treefbb38c1cdd0d25b8e121beb049a183200cd2d147 /lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
parentcb5942909249958cd70f6247c4493db5aa6b8a5a (diff)
parent6c8c99caba7cf5f77f7f5922a026c058a55138df (diff)
downloadotp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.tar.gz
otp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.tar.bz2
otp-ff107aa1a9b7a12f72a6b5a3ab00e0088b1c2bd9.zip
Merge branch 'nox/compiler/beam_bool-not_boolean_expr'
* nox/compiler/beam_bool-not_boolean_expr: Compile BIF calls and operator expressions to Core the same way Do not try to optimize non-boolean guards
Diffstat (limited to 'lib/compiler/test/core_SUITE_data/bad_boolean_guard.core')
-rw-r--r--lib/compiler/test/core_SUITE_data/bad_boolean_guard.core32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
new file mode 100644
index 0000000000..318f8e3dc7
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
@@ -0,0 +1,32 @@
+module 'bad_boolean_guard' ['bad_boolean_guard'/0,
+ 'module_info'/0,
+ 'module_info'/1]
+ attributes []
+'bad_boolean_guard'/0 =
+ fun () ->
+ apply 'f'/1
+ ('true')
+'f'/1 =
+ fun (_X_cor0) ->
+ case _X_cor0 of
+ <X>
+ when try
+ call 'erlang':'and'
+ ('bad', _X_cor0)
+ of <Try> ->
+ Try
+ catch <T,R> ->
+ 'false' ->
+ 'not_ok'
+ <_X_cor3> when 'true' ->
+ 'ok'
+ end
+'module_info'/0 =
+ fun () ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard')
+'module_info'/1 =
+ fun (_X_cor0) ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard', _X_cor0)
+end \ No newline at end of file