aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-05-12 10:36:37 +0200
committerBjörn Gustavsson <[email protected]>2016-05-13 10:52:25 +0200
commit0bfa13f404c2c9155d9f948f9c3ef7b1fb247ab4 (patch)
treee1eefcb9a99003486f05fd9413da3977c719931d /lib/compiler
parenta1493984f80b42c9bff13ea13e6bbae8db0830c2 (diff)
downloadotp-0bfa13f404c2c9155d9f948f9c3ef7b1fb247ab4.tar.gz
otp-0bfa13f404c2c9155d9f948f9c3ef7b1fb247ab4.tar.bz2
otp-0bfa13f404c2c9155d9f948f9c3ef7b1fb247ab4.zip
compile_SUITE: Cover numeric variable names in core_pp
The inliner generates variable whose names are numeric. Run the inliner to cover one more line in core_pp.
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/test/compile_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 45b9a5a389..a15efc2a00 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -779,8 +779,13 @@ do_core_roundtrip_1(Mod, Abstr, Outdir) ->
%% Primarily, test that annotations are accepted for all
%% constructs. Secondarily, smoke test cerl_trees:label/1.
- {Core,_} = cerl_trees:label(Core0),
- do_core_roundtrip_2(Mod, Core, Outdir).
+ {Core1,_} = cerl_trees:label(Core0),
+ do_core_roundtrip_2(Mod, Core1, Outdir),
+
+ %% Run the inliner to force generation of variables
+ %% with numeric names.
+ {ok,Mod,Core2} = compile:forms(Abstr, [inline,to_core]),
+ do_core_roundtrip_2(Mod, Core2, Outdir).
do_core_roundtrip_2(M, Core0, Outdir) ->
CoreFile = filename:join(Outdir, atom_to_list(M)++".core"),