diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:35:31 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-10 15:35:31 +0100 |
commit | c94b0ddcec4720391036826db64d3157a2972fd8 (patch) | |
tree | d35868c110a8fa927467a485ba921523ce2b0d18 | |
parent | mds-kbdc: compile-layout: m bug fix + more test cases (diff) | |
download | mds-c94b0ddcec4720391036826db64d3157a2972fd8.tar.gz mds-c94b0ddcec4720391036826db64d3157a2972fd8.tar.bz2 mds-c94b0ddcec4720391036826db64d3157a2972fd8.tar.xz |
mds-kbdc: compile-layout: fix sideeffect tracking
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/mds-kbdc/compile-layout.c | 2 | ||||
-rw-r--r-- | test-files/mds-kbdc/compile-layout/invalid/mix_of_with_and_without_sideeffect | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/src/mds-kbdc/compile-layout.c b/src/mds-kbdc/compile-layout.c index db2680d..99378f5 100644 --- a/src/mds-kbdc/compile-layout.c +++ b/src/mds-kbdc/compile-layout.c @@ -2428,7 +2428,7 @@ static int compile_map(mds_kbdc_tree_map_t* restrict tree) done: mds_kbdc_tree_free(seq); mds_kbdc_tree_free(res); - have_side_effect = old_have_side_effect; + have_side_effect |= old_have_side_effect; return 0; FAIL_BEGIN; mds_kbdc_include_stack_free(include_stack); diff --git a/test-files/mds-kbdc/compile-layout/invalid/mix_of_with_and_without_sideeffect b/test-files/mds-kbdc/compile-layout/invalid/mix_of_with_and_without_sideeffect new file mode 100644 index 0000000..9c9a0f8 --- /dev/null +++ b/test-files/mds-kbdc/compile-layout/invalid/mix_of_with_and_without_sideeffect @@ -0,0 +1,15 @@ +let \1 : {0} +function f/0 + if 1 # if statement is just to reduce warnings + "\set(1 0 0)" + "c" + end if +end function +macro m/0 + "a" + "\f()" + "b" + "\f()" +end macro +m() + |