aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/beam_validator_SUITE_data
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-08 14:30:06 +0100
committerBjörn Gustavsson <[email protected]>2015-01-21 10:01:08 +0100
commitd92a5127d894581f9681530072f38bd7d99ce9bf (patch)
tree101d7243099a402df64606373990382caee84b1b /lib/compiler/test/beam_validator_SUITE_data
parentb410d5881fbb408904e0bfd5898cf7983b503f05 (diff)
downloadotp-d92a5127d894581f9681530072f38bd7d99ce9bf.tar.gz
otp-d92a5127d894581f9681530072f38bd7d99ce9bf.tar.bz2
otp-d92a5127d894581f9681530072f38bd7d99ce9bf.zip
beam_validator_SUITE: Mend the compiler_bug/1 test case
The compiler_bug/1 test case succeeded for the wrong reason. The 'asm' option is no longer supported (was ignored) and the compiler looked for a .erl file. Make sure that we don't fall for this trick again by making sure that the error is reported from beam_validator.
Diffstat (limited to 'lib/compiler/test/beam_validator_SUITE_data')
-rw-r--r--lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S b/lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S
new file mode 100644
index 0000000000..ba27bf5c47
--- /dev/null
+++ b/lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S
@@ -0,0 +1,38 @@
+{module, compiler_bug}. %% version = 0
+
+{exports, [{module_info,0},{module_info,1},{sum,2}]}.
+
+{attributes, []}.
+
+{labels, 7}.
+
+
+{function, sum, 2, 2}.
+ {label,1}.
+ {line,[{location,"compiler_bug.erl",4}]}.
+ {func_info,{atom,compiler_bug},{atom,sum},2}.
+ {label,2}.
+ {line,[{location,"compiler_bug.erl",5}]}.
+ {gc_bif,'+',{f,0},2,[{y,0},{y,1}],{x,0}}.
+ return.
+
+
+{function, module_info, 0, 4}.
+ {label,3}.
+ {line,[]}.
+ {func_info,{atom,compiler_bug},{atom,module_info},0}.
+ {label,4}.
+ {move,{atom,compiler_bug},{x,0}}.
+ {line,[]}.
+ {call_ext_only,1,{extfunc,erlang,get_module_info,1}}.
+
+
+{function, module_info, 1, 6}.
+ {label,5}.
+ {line,[]}.
+ {func_info,{atom,compiler_bug},{atom,module_info},1}.
+ {label,6}.
+ {move,{x,0},{x,1}}.
+ {move,{atom,compiler_bug},{x,0}}.
+ {line,[]}.
+ {call_ext_only,2,{extfunc,erlang,get_module_info,2}}.