diff --git a/tests/syntax/ast_diff_1.i b/tests/syntax/ast_diff_1.i index 7afc3a0e3b37b57df5eb2bfe9d78d281e6e14d44..86b0c7606e68395abec4be4f0e5f217d056450c7 100644 --- a/tests/syntax/ast_diff_1.i +++ b/tests/syntax/ast_diff_1.i @@ -1,4 +1,6 @@ /* run.config + COMMENT: we need Eva for the loop unroll ACSL extension + PLUGIN: eva MODULE: @PTEST_NAME@ OPT: -then -ast-diff %{dep:ast_diff_2.c} OPT: -then -ast-diff %{dep:ast_diff_2.c} -cpp-extra-args="-DADD_ENUM_TAG" @@ -107,3 +109,13 @@ void se() { struct s S; S.c[0] = 1; } + +void with_loop_unroll_same() { + //@ loop unroll 5; + for (int i = 0; i < 5; i++); +} + +void with_loop_unroll_diff() { + //@ loop unroll 4; + for (int i = 0; i < 5; i++); +} diff --git a/tests/syntax/ast_diff_2.c b/tests/syntax/ast_diff_2.c index c0bd72914c114fde906e283bda7ba599497e621a..f0009e13c1827c06787605dae812ac2ed3d60cd3 100644 --- a/tests/syntax/ast_diff_2.c +++ b/tests/syntax/ast_diff_2.c @@ -102,3 +102,13 @@ void se() { struct s S; S.c[0] = 1; } + +void with_loop_unroll_same() { + //@ loop unroll 5; + for (int i = 0; i < 5; i++); +} + +void with_loop_unroll_diff() { + //@ loop unroll 5; + for (int i = 0; i < 5; i++); +} diff --git a/tests/syntax/oracle/ast_diff_1.0.res.oracle b/tests/syntax/oracle/ast_diff_1.0.res.oracle index 040eb7eac6a64962c2abd84ec40b54ea065123b1..ef54b4b6f7e1da11eb73de3c3e6663ef4f6c8233 100644 --- a/tests/syntax/oracle/ast_diff_1.0.res.oracle +++ b/tests/syntax/oracle/ast_diff_1.0.res.oracle @@ -21,10 +21,14 @@ [AST diff test] Variable g: => g [AST diff test] Variable se: => se [AST diff test] Variable S: => S -[AST diff test] Variable has_static_local_x: => has_static_local_y +[AST diff test] Variable with_loop_unroll_same: => with_loop_unroll_same +[AST diff test] Variable i_0: => i_0 [AST diff test] Variable h: => h -[AST diff test] Variable __retres: => __retres +[AST diff test] Variable with_loop_unroll_diff: => with_loop_unroll_diff +[AST diff test] Variable i_0: => i_0 +[AST diff test] Variable has_static_local_x: => has_static_local_y [AST diff test] Variable use_logic_builtin: => use_logic_builtin +[AST diff test] Variable __retres: => __retres [AST diff test] Variable x: => x [AST diff test] Variable y: => y [AST diff test] Variable has_static_local: => has_static_local @@ -39,7 +43,9 @@ [AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function g: N/A [AST diff test] Function se: => se +[AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same [AST diff test] Function h: -> h (body changed) +[AST diff test] Function with_loop_unroll_diff: => with_loop_unroll_diff [AST diff test] Function use_logic_builtin: => use_logic_builtin [AST diff test] Function has_static_local: => has_static_local [AST diff test] Function decl: => decl diff --git a/tests/syntax/oracle/ast_diff_1.1.res.oracle b/tests/syntax/oracle/ast_diff_1.1.res.oracle index 1fe85b83738a956efe119cd4c29b473fbeea6ede..21e1ebbe13b1244c11a7a15a224b51b5bc409c72 100644 --- a/tests/syntax/oracle/ast_diff_1.1.res.oracle +++ b/tests/syntax/oracle/ast_diff_1.1.res.oracle @@ -2,15 +2,6 @@ [kernel] Parsing ast_diff_2.c (with preprocessing) [kernel] Parsing ast_diff_1.i (no preprocessing) [AST diff test] Showing correspondances between orig_default and default -[AST diff test] Variable use_logic_builtin: => use_logic_builtin -[AST diff test] Variable x: => x -[AST diff test] Variable y: => y -[AST diff test] Variable has_static_local: => has_static_local -[AST diff test] Variable decl: => decl -[AST diff test] Variable used_in_decl: => used_in_decl -[AST diff test] Variable ptr_func: => ptr_func -[AST diff test] Variable i: => i -[AST diff test] Variable local_var_use: => local_var_use [AST diff test] Variable v: => w [AST diff test] Variable a: => q [AST diff test] Variable x: => z @@ -27,17 +18,32 @@ [AST diff test] Variable c: => c [AST diff test] Variable g: => g [AST diff test] Variable se: => se -[AST diff test] Variable has_static_local_x: => has_static_local_y +[AST diff test] Variable with_loop_unroll_same: => with_loop_unroll_same +[AST diff test] Variable i_0: => i_0 [AST diff test] Variable h: => h -[AST diff test] Function use_logic_builtin: => use_logic_builtin -[AST diff test] Function has_static_local: => has_static_local -[AST diff test] Function decl: => decl -[AST diff test] Function i: => i -[AST diff test] Function local_var_use: => local_var_use +[AST diff test] Variable with_loop_unroll_diff: => with_loop_unroll_diff +[AST diff test] Variable i_0: => i_0 +[AST diff test] Variable has_static_local_x: => has_static_local_y +[AST diff test] Variable use_logic_builtin: => use_logic_builtin +[AST diff test] Variable x: => x +[AST diff test] Variable y: => y +[AST diff test] Variable has_static_local: => has_static_local +[AST diff test] Variable decl: => decl +[AST diff test] Variable used_in_decl: => used_in_decl +[AST diff test] Variable ptr_func: => ptr_func +[AST diff test] Variable i: => i +[AST diff test] Variable local_var_use: => local_var_use [AST diff test] Function use_s: N/A [AST diff test] Function with_goto_changed: -> with_goto_changed (body changed) [AST diff test] Function f: => f [AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function g: N/A [AST diff test] Function se: -> se (body changed) +[AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same [AST diff test] Function h: -> h (body changed) +[AST diff test] Function with_loop_unroll_diff: => with_loop_unroll_diff +[AST diff test] Function use_logic_builtin: => use_logic_builtin +[AST diff test] Function has_static_local: => has_static_local +[AST diff test] Function decl: => decl +[AST diff test] Function i: => i +[AST diff test] Function local_var_use: => local_var_use