From d92a5127d894581f9681530072f38bd7d99ce9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 8 Jan 2015 14:30:06 +0100 Subject: 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. --- .../test/beam_validator_SUITE_data/compiler_bug.S | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S (limited to 'lib/compiler/test/beam_validator_SUITE_data/compiler_bug.S') 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}}. -- cgit v1.2.3