Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
[NF] Add function vectorization test.
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2635
  - #1025
  • Loading branch information
perost authored and OpenModelica-Hudson committed Sep 6, 2018
1 parent ee8a23c commit 989052e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
25 changes: 25 additions & 0 deletions flattening/modelica/scodeinst/FuncVectorizationCastConflict1.mo
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// name: FuncVectorizationCastConflict1
// keywords: vectorization function
// status: correct
// cflags: -d=newInst
//
// Checks that a vectorized function that matches both exactly and via casting
// chooses the exact match.
//

model FuncVectorizationCastConflict1
Integer x[3];
equation
x = mod(x, 3);
end FuncVectorizationCastConflict1;


// Result:
// class FuncVectorizationCastConflict1
// Integer x[1];
// Integer x[2];
// Integer x[3];
// equation
// x = array(mod(x[$i1], 3) for $i1 in 1:3);
// end FuncVectorizationCastConflict1;
// endResult
1 change: 1 addition & 0 deletions flattening/modelica/scodeinst/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ FuncVectorization1.mo \
FuncVectorization2.mo \
FuncVectorization3.mo \
FuncVectorizationBuiltin.mo \
FuncVectorizationCastConflict1.mo \
FuncVectorizationMap1.mo \
FuncWildcard.mo \
FuncWrongType.mo \
Expand Down

0 comments on commit 989052e

Please sign in to comment.