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

[NF] Add function vectorization test. #1025

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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